@@ -157,6 +157,60 @@ func TestWorkflowsUseSharedKindClusterHelper(t *testing.T) {
157157 }
158158}
159159
160+ func TestKindDependencyImageHelperPinsDigestReferences (t * testing.T ) {
161+ contents := string (readFile (t , repoPath ("scripts" , "ci" , "dependency-images.sh" )))
162+
163+ for _ , want := range []string {
164+ `DEFAULT_DATAPLANE_IMAGE="ghcr.io/nantian-gw/dataplane@sha256:bacc962711a95fd8fa75e3f9206319a42490b6eaf94257d57fc48f998444ea0e"` ,
165+ `DEFAULT_DASHBOARD_IMAGE="ghcr.io/nantian-gw/dashboard@sha256:74f4c0f4afbf3f8c0ec26110a31d2327ca45d97d0ebd0ce73a765b051d6c208a"` ,
166+ } {
167+ if ! strings .Contains (contents , want ) {
168+ t .Fatalf ("dependency image helper missing %q" , want )
169+ }
170+ }
171+
172+ for _ , unwanted := range []string {
173+ `ghcr.io/nantian-gw/dataplane:latest` ,
174+ `ghcr.io/nantian-gw/dashboard:latest` ,
175+ } {
176+ if strings .Contains (contents , unwanted ) {
177+ t .Fatalf ("dependency image helper must not reference %q" , unwanted )
178+ }
179+ }
180+ }
181+
182+ func TestKindValidationEntrypointsResolvePinnedDependencyImages (t * testing.T ) {
183+ for _ , path := range []string {
184+ repoPath ("scripts" , "ci" , "load-kind-images.sh" ),
185+ repoPath ("scripts" , "ci" , "deploy-kind-conformance.sh" ),
186+ repoPath (".github" , "workflows" , "e2e.yml" ),
187+ repoPath (".github" , "workflows" , "conformance.yml" ),
188+ } {
189+ t .Run (filepath .Base (path ), func (t * testing.T ) {
190+ contents := string (readFile (t , path ))
191+
192+ for _ , want := range []string {
193+ `dependency-images.sh` ,
194+ `DEFAULT_DATAPLANE_IMAGE` ,
195+ `DEFAULT_DASHBOARD_IMAGE` ,
196+ } {
197+ if ! strings .Contains (contents , want ) {
198+ t .Fatalf ("%s missing %q" , path , want )
199+ }
200+ }
201+
202+ for _ , unwanted := range []string {
203+ `ghcr.io/nantian-gw/dataplane:latest` ,
204+ `ghcr.io/nantian-gw/dashboard:latest` ,
205+ } {
206+ if strings .Contains (contents , unwanted ) {
207+ t .Fatalf ("%s still references mutable image %q" , path , unwanted )
208+ }
209+ }
210+ })
211+ }
212+ }
213+
160214func TestReleaseWorkflowUsesCurrentCIEntrypoints (t * testing.T ) {
161215 contents := string (readFile (t , repoPath (".github" , "workflows" , "release.yml" )))
162216
0 commit comments