@@ -22,12 +22,12 @@ def initialize(self) -> Testdrive:
22
22
> CREATE SECRET pgpass1 AS 'postgres';
23
23
24
24
> CREATE CONNECTION pg1 FOR POSTGRES
25
- HOST 'postgres-source ',
25
+ HOST 'postgres',
26
26
DATABASE postgres,
27
27
USER postgres1,
28
28
PASSWORD SECRET pgpass1
29
29
30
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
30
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
31
31
CREATE USER postgres1 WITH SUPERUSER PASSWORD 'postgres';
32
32
ALTER USER postgres1 WITH replication;
33
33
DROP PUBLICATION IF EXISTS postgres_source;
@@ -54,25 +54,25 @@ def manipulate(self) -> List[Testdrive]:
54
54
(PUBLICATION 'postgres_source')
55
55
FOR TABLES (postgres_source_table AS postgres_source_tableA);
56
56
57
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
57
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
58
58
INSERT INTO postgres_source_table SELECT 'B', 1, REPEAT('X', 1024) FROM generate_series(1,100);
59
59
UPDATE postgres_source_table SET f2 = f2 + 1;
60
60
61
61
> CREATE SECRET pgpass2 AS 'postgres';
62
62
63
63
> CREATE CONNECTION pg2 FOR POSTGRES
64
- HOST 'postgres-source ',
64
+ HOST 'postgres',
65
65
DATABASE postgres,
66
66
USER postgres1,
67
67
PASSWORD SECRET pgpass1
68
68
69
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
69
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
70
70
INSERT INTO postgres_source_table SELECT 'C', 1, REPEAT('X', 1024) FROM generate_series(1,100);
71
71
UPDATE postgres_source_table SET f2 = f2 + 1;
72
72
""" ,
73
73
"""
74
74
75
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
75
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
76
76
INSERT INTO postgres_source_table SELECT 'D', 1, REPEAT('X', 1024) FROM generate_series(1,100);
77
77
UPDATE postgres_source_table SET f2 = f2 + 1;
78
78
@@ -81,18 +81,18 @@ def manipulate(self) -> List[Testdrive]:
81
81
(PUBLICATION 'postgres_source')
82
82
FOR TABLES (postgres_source_table AS postgres_source_tableB);
83
83
84
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
84
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
85
85
INSERT INTO postgres_source_table SELECT 'E', 1, REPEAT('X', 1024) FROM generate_series(1,100);
86
86
UPDATE postgres_source_table SET f2 = f2 + 1;
87
87
88
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
88
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
89
89
INSERT INTO postgres_source_table SELECT 'F', 1, REPEAT('X', 1024) FROM generate_series(1,100);
90
90
UPDATE postgres_source_table SET f2 = f2 + 1;
91
91
92
92
> CREATE SECRET pgpass3 AS 'postgres';
93
93
94
94
> CREATE CONNECTION pg3 FOR POSTGRES
95
- HOST 'postgres-source ',
95
+ HOST 'postgres',
96
96
DATABASE postgres,
97
97
USER postgres1,
98
98
PASSWORD SECRET pgpass3
@@ -102,12 +102,12 @@ def manipulate(self) -> List[Testdrive]:
102
102
(PUBLICATION 'postgres_source')
103
103
FOR TABLES (postgres_source_table AS postgres_source_tableC);
104
104
105
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
105
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
106
106
INSERT INTO postgres_source_table SELECT 'G', 1, REPEAT('X', 1024) FROM generate_series(1,100);
107
107
UPDATE postgres_source_table SET f2 = f2 + 1;
108
108
109
109
110
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
110
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
111
111
INSERT INTO postgres_source_table SELECT 'H', 1, REPEAT('X', 1024) FROM generate_series(1,100);
112
112
UPDATE postgres_source_table SET f2 = f2 + 1;
113
113
""" ,
@@ -160,12 +160,12 @@ def initialize(self) -> Testdrive:
160
160
> CREATE SECRET postgres_mz_now_pass AS 'postgres';
161
161
162
162
> CREATE CONNECTION postgres_mz_now_conn FOR POSTGRES
163
- HOST 'postgres-source ',
163
+ HOST 'postgres',
164
164
DATABASE postgres,
165
165
USER postgres2,
166
166
PASSWORD SECRET postgres_mz_now_pass
167
167
168
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
168
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
169
169
CREATE USER postgres2 WITH SUPERUSER PASSWORD 'postgres';
170
170
ALTER USER postgres2 WITH replication;
171
171
DROP PUBLICATION IF EXISTS postgres_mz_now_publication;
@@ -201,7 +201,7 @@ def manipulate(self) -> List[Testdrive]:
201
201
Testdrive (dedent (s ))
202
202
for s in [
203
203
"""
204
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
204
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
205
205
INSERT INTO postgres_mz_now_table VALUES (NOW(), 'A2');
206
206
INSERT INTO postgres_mz_now_table VALUES (NOW(), 'B2');
207
207
INSERT INTO postgres_mz_now_table VALUES (NOW(), 'C2');
@@ -211,7 +211,7 @@ def manipulate(self) -> List[Testdrive]:
211
211
UPDATE postgres_mz_now_table SET f1 = NOW() WHERE f2 = 'C1';
212
212
""" ,
213
213
"""
214
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
214
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
215
215
INSERT INTO postgres_mz_now_table VALUES (NOW(), 'A3');
216
216
INSERT INTO postgres_mz_now_table VALUES (NOW(), 'B3');
217
217
INSERT INTO postgres_mz_now_table VALUES (NOW(), 'C3');
@@ -230,7 +230,7 @@ def validate(self) -> Testdrive:
230
230
> SELECT COUNT(*) FROM postgres_mz_now_table;
231
231
13
232
232
233
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
233
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
234
234
INSERT INTO postgres_mz_now_table VALUES (NOW(), 'A4');
235
235
INSERT INTO postgres_mz_now_table VALUES (NOW(), 'B4');
236
236
INSERT INTO postgres_mz_now_table VALUES (NOW(), 'C4');
@@ -250,7 +250,7 @@ def validate(self) -> Testdrive:
250
250
0
251
251
252
252
# Rollback the last INSERTs so that validate() can be called multiple times
253
- $ postgres-execute connection=postgres://postgres:postgres@postgres-source
253
+ $ postgres-execute connection=postgres://postgres:postgres@postgres
254
254
INSERT INTO postgres_mz_now_table VALUES (NOW(), 'B3');
255
255
DELETE FROM postgres_mz_now_table WHERE f2 LIKE '%4%';
256
256
"""
0 commit comments