@@ -2182,7 +2182,6 @@ func TestTrinoCacheModeFollowsScenario(t *testing.T) {
21822182 fakes := newRunSHFakes (t )
21832183 writeFake (t , fakes .binDir , "envsubst" , `#!/usr/bin/env bash
21842184printf 'cache-mode %s\n' "${TRINO_FILESYSTEM_CACHE_ENABLED:-unset}" >> "$RUN_SH_TEST_CALLS"
2185- printf 'trino-image %s\n' "${TRINO_IMAGE:-unset}" >> "$RUN_SH_TEST_CALLS"
21862185cat
21872186` )
21882187 secretDir := filepath .Join (filepath .Dir (fakes .binDir ), "secrets" )
@@ -2191,32 +2190,13 @@ cat
21912190 t .Fatal (err )
21922191 }
21932192 }
2194- cmd := runSHCommand (t , fakes .binDir , "deploy" , "SCENARIO_DEV_ALLOW_DUCKLING_DELETE=1" , "E2E_SUITE=trino" , "SCENARIO_NAME=" + tc .scenario , "TRINO_IMAGE=" , " TRINO_POD_IDENTITY_ROLE=arn:aws:iam::123456789012:role/trino-test" , "SCENARIO_POD_IDENTITY_ROLE=arn:aws:iam::123456789012:role/scenario-test" )
2193+ cmd := runSHCommand (t , fakes .binDir , "deploy" , "SCENARIO_DEV_ALLOW_DUCKLING_DELETE=1" , "E2E_SUITE=trino" , "SCENARIO_NAME=" + tc .scenario , "TRINO_POD_IDENTITY_ROLE=arn:aws:iam::123456789012:role/trino-test" , "SCENARIO_POD_IDENTITY_ROLE=arn:aws:iam::123456789012:role/scenario-test" )
21952194 if out , err := cmd .CombinedOutput (); err != nil {
21962195 t .Fatalf ("deploy: %v\n %s" , err , out )
21972196 }
2198- calls := fakes .calls (t )
2199- if ! strings .Contains (calls , "cache-mode " + tc .enabled + "\n " ) {
2197+ if calls := fakes .calls (t ); ! strings .Contains (calls , "cache-mode " + tc .enabled + "\n " ) {
22002198 t .Fatalf ("catalog cache mode was not %s: %s" , tc .enabled , calls )
22012199 }
2202- for _ , want := range []string {
2203- "--service-account duckgres-scenario --role-arn arn:aws:iam::123456789012:role/scenario-test" ,
2204- "trino-image ghcr.io/posthog/trino:a2943f5ec37f1d5a9ab90b9bec56695a00de4584@sha256:7a57712498446bd97393cadece90ce0bc297f6feab8e0098510668fe2667ac39" ,
2205- "rollout status deploy/duckgres-hoglake-postgres" ,
2206- "rollout status deploy/duckgres-hoglake" ,
2207- `"name":"DUCKGRES_TRINO_HOGLAKE_URI","value":"http://duckgres-hoglake.duckgres-ci-pr-123.svc:8080"` ,
2208- } {
2209- if ! strings .Contains (calls , want ) {
2210- t .Errorf ("missing Hoglake scenario deployment %q" , want )
2211- }
2212- }
2213- identity := strings .Index (calls , "--service-account trino --role-arn" )
2214- hoglakeStart := strings .Index (calls , "patch deployment duckgres-hoglake --type=merge" )
2215- ready := strings .Index (calls , "rollout status deploy/duckgres-hoglake --timeout=" )
2216- catalog := strings .Index (calls , `"name":"DUCKGRES_TRINO_HOGLAKE_URI"` )
2217- if identity < 0 || hoglakeStart <= identity || ready <= hoglakeStart || catalog <= ready {
2218- t .Error ("Hoglake must start after Pod Identity and become ready before the control plane uses its catalog" )
2219- }
22202200 })
22212201 }
22222202}
0 commit comments