From ab26ff8715d6b8094f5c234ca49d6ceac0b2e808 Mon Sep 17 00:00:00 2001 From: Austin Blatt Date: Tue, 8 Aug 2023 11:29:51 -0700 Subject: [PATCH] (maint) format timestamp with ISO formatter in the pe-puppetdb tests, this `str` call was leaving in a space between the date and time that wasn't working as a URL parameter. Switch to using the to-string function which formats the timestamp with ISO 8601 formatting, which uses a T to separate the date and time. --- src/puppetlabs/puppetdb/client.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/puppetlabs/puppetdb/client.clj b/src/puppetlabs/puppetdb/client.clj index cd6ae7955c..11edc6e454 100644 --- a/src/puppetlabs/puppetdb/client.clj +++ b/src/puppetlabs/puppetdb/client.clj @@ -4,6 +4,7 @@ [puppetlabs.puppetdb.command.constants :refer [command-names]] [puppetlabs.puppetdb.cheshire :as json] [puppetlabs.puppetdb.schema :refer [defn-validated]] + [puppetlabs.puppetdb.time :as t] [puppetlabs.puppetdb.utils :as utils] [schema.core :as s]) (:import @@ -51,7 +52,7 @@ :certname certname :producer-timestamp (-> payload :producer_timestamp - str) + t/to-string) :timeout timeout}) url (str (utils/base-url->str base-url) url-params) post-opts (merge {:body body