@@ -114,6 +114,7 @@ self.inputs.nixpkgs.lib.nixos.runTest {
114114 }
115115 sql_test_directory = Path("${ ../../tests } ")
116116 pg_regress_test_name = "${ ( installedExtension "15" ) . pgRegressTestName or pname } "
117+ after_create_sql = Path("${ ../../../ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql } ")
117118
118119 ${ builtins . readFile ./lib.py }
119120
@@ -125,16 +126,15 @@ self.inputs.nixpkgs.lib.nixos.runTest {
125126 test = PostgresExtensionTest(server, extension_name, versions, sql_test_directory, support_upgrade)
126127
127128 with subtest("Check upgrade path with postgresql 15"):
128- test.check_upgrade_path("15")
129- test.run_sql_file("${ ../../../ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql } ")
129+ test.check_upgrade_path("15", after_create_sql)
130130
131131 with subtest("Check pg_regress with postgresql 15 after extension upgrade"):
132132 test.check_pg_regress(Path("${ psql_15 } /lib/pgxs/src/test/regress/pg_regress"), "15", pg_regress_test_name)
133133
134134 last_version = None
135135 with subtest("Check the install of the last version of the extension"):
136136 last_version = test.check_install_last_version("15")
137- test.run_sql_file(" ${ ../../../ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql } " )
137+ test.run_sql_file(after_create_sql )
138138
139139 if ext_has_background_worker:
140140 with subtest("Test switch_${ pname } _version"):
@@ -150,18 +150,17 @@ self.inputs.nixpkgs.lib.nixos.runTest {
150150
151151 with subtest("Check last version of the extension after postgresql upgrade"):
152152 test.assert_version_matches(last_version)
153- test.run_sql_file(" ${ ../../../ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql } " )
153+ test.run_sql_file(after_create_sql )
154154
155155 with subtest("Check upgrade path with postgresql 17"):
156- test.check_upgrade_path("17")
157- test.run_sql_file("${ ../../../ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql } ")
156+ test.check_upgrade_path("17", after_create_sql)
158157
159158 with subtest("Check pg_regress with postgresql 17 after extension upgrade"):
160159 test.check_pg_regress(Path("${ psql_17 } /lib/pgxs/src/test/regress/pg_regress"), "17", pg_regress_test_name)
161160
162161 with subtest("Check the install of the last version of the extension"):
163162 test.check_install_last_version("17")
164- test.run_sql_file(" ${ ../../../ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql } " )
163+ test.run_sql_file(after_create_sql )
165164
166165 with subtest("Check pg_regress with postgresql 17 after installing the last version"):
167166 test.check_pg_regress(Path("${ psql_17 } /lib/pgxs/src/test/regress/pg_regress"), "17", pg_regress_test_name)
0 commit comments