Commit 31519f4
authored
test: Move event_outbox to tenant schema in party cascade test (#2140)
* test: Move event_outbox to tenant schema in party cascade test
Create event_outbox in the tenant schema to match the production schema
placement and the pattern in internal-account/service/outbox_test.go.
Adds tenant_id column and uses qualified schema name.
Set database-level search_path via ALTER DATABASE so all connection pool
connections (including the outbox worker's) resolve unqualified table
names to the tenant schema. A session-level SET search_path only affects
a single connection, which caused the load test to receive 0 Kafka events
under concurrent load.
* test: Address review feedback on event_outbox tenant schema setup
- Use pq.QuoteIdentifier instead of %q for SQL identifier quoting,
consistent with the other CREATE TABLE statements in the same function
- Remove &events.EventOutbox{} from SetupPostgres: the public-schema
auto-migrate is superseded by the explicit tenant-schema CREATE TABLE
below, eliminating the duplicate table
---------
Co-authored-by: Ben Coombs <bjcoombs@users.noreply.github.com>1 parent 0e04217 commit 31519f4
1 file changed
Lines changed: 18 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
| 163 | + | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
171 | 182 | | |
172 | 183 | | |
173 | 184 | | |
| |||
0 commit comments