Description: Fix tests for compatibility with pgsql 17
Author: Rob Browning <rlb@defaultvalue.org>
Date: Fri, 22 Nov 2024 23:45:43 -0500
Forwarded: not-needed

This avoids test failures due to slight differences in the output of some tests
when testing with PostgreSQL 17.

Index: puppetdb/test/puppetlabs/puppetdb/scf/migrate_partitioning_test.clj
===================================================================
--- puppetdb.orig/test/puppetlabs/puppetdb/scf/migrate_partitioning_test.clj
+++ puppetdb/test/puppetlabs/puppetdb/scf/migrate_partitioning_test.clj
@@ -553,7 +553,7 @@
                                                                (.plusDays (.truncatedTo date-of-week (ChronoUnit/DAYS)) 1))]
                                        [{:left-only nil
                                          :right-only {:constraint_name
-                                                      (format "(((\"timestamp\" >= '%s'::timestamp with time zone) AND (\"timestamp\" < '%s'::timestamp with time zone)))"
+                                                      (format "((\"timestamp\" >= '%s'::timestamp with time zone) AND (\"timestamp\" < '%s'::timestamp with time zone))"
                                                               start-of-day end-of-day)
                                                       :table_name table-name
                                                       :constraint_type "CHECK"
@@ -1177,7 +1177,7 @@
                                                                 (.plusDays (.truncatedTo date-of-week (ChronoUnit/DAYS)) 1))]
                                         [{:left-only nil
                                           :right-only {:constraint_name
-                                                       (format "(((producer_timestamp >= '%s'::timestamp with time zone) AND (producer_timestamp < '%s'::timestamp with time zone)))"
+                                                       (format "((producer_timestamp >= '%s'::timestamp with time zone) AND (producer_timestamp < '%s'::timestamp with time zone))"
                                                                start-of-day end-of-day)
                                                        :table_name table-name
                                                        :constraint_type "CHECK"
Index: puppetdb/test/puppetlabs/puppetdb/scf/migrate_test.clj
===================================================================
--- puppetdb.orig/test/puppetlabs/puppetdb/scf/migrate_test.clj
+++ puppetdb/test/puppetlabs/puppetdb/scf/migrate_test.clj
@@ -1745,7 +1745,7 @@
         formatted-start-of-next-day (get-formatted-start-of-day (.plusDays date 1))]
     [{:left-only
       {:constraint_name
-       (format "(((\"timestamp\" >= '%s'::timestamp with time zone) AND (\"timestamp\" < '%s'::timestamp with time zone)))" formatted-start-of-day formatted-start-of-next-day),
+       (format "((\"timestamp\" >= '%s'::timestamp with time zone) AND (\"timestamp\" < '%s'::timestamp with time zone))" formatted-start-of-day formatted-start-of-next-day),
        :table_name (format "resource_events_%s" date-suffix),
        :constraint_type "CHECK",
        :initially_deferred "NO",
@@ -1974,7 +1974,7 @@
         table-name (format "reports_%s" date-suffix)]
     [{:left-only
       {:constraint_name
-       (format "(((producer_timestamp >= '%s'::timestamp with time zone) AND (producer_timestamp < '%s'::timestamp with time zone)))" formatted-start-of-day formatted-start-of-next-day)
+       (format "((producer_timestamp >= '%s'::timestamp with time zone) AND (producer_timestamp < '%s'::timestamp with time zone))" formatted-start-of-day formatted-start-of-next-day)
        :table_name (format "reports_%s" date-suffix)
        :constraint_type "CHECK"
        :initially_deferred "NO"
