@@ -217,6 +217,27 @@ func TestReleaseWorkflowUsesReleaseTaggedDependencyImages(t *testing.T) {
217217 }
218218}
219219
220+ func TestReleaseWorkflowCollectsDiagnosticsWithCurrentHelper (t * testing.T ) {
221+ contents := string (readFile (t , repoPath (".github" , "workflows" , "release.yml" )))
222+
223+ for _ , want := range []string {
224+ `run: ARTIFACT_DIR=release-src/tmp/conformance-diagnostics scripts/ci/collect-kind-diagnostics.sh` ,
225+ } {
226+ if ! strings .Contains (contents , want ) {
227+ t .Fatalf ("release workflow missing %q" , want )
228+ }
229+ }
230+
231+ for _ , unwanted := range []string {
232+ `working-directory: release-src
233+ run: ARTIFACT_DIR=tmp/conformance-diagnostics scripts/ci/collect-kind-diagnostics.sh` ,
234+ } {
235+ if strings .Contains (contents , unwanted ) {
236+ t .Fatalf ("release workflow still contains stale diagnostics path %q" , unwanted )
237+ }
238+ }
239+ }
240+
220241func TestSecurityScanWorkflowUsesExistingHelper (t * testing.T ) {
221242 contents := string (readFile (t , repoPath (".github" , "workflows" , "security-scans.yml" )))
222243 helperPath := repoPath ("scripts" , "ci" , "run-security-scans.sh" )
@@ -252,18 +273,20 @@ func TestCollectKindDiagnosticsCapturesFrontendTopology(t *testing.T) {
252273 }
253274}
254275
255- func TestSmokeScriptProbesDerivedGatewayServiceFromInsideCluster (t * testing.T ) {
276+ func TestSmokeScriptUsesCurlBasedInClusterProbe (t * testing.T ) {
256277 contents := string (readFile (t , repoPath ("test" , "e2e" , "smoke" , "run.sh" )))
257278
258279 for _ , want := range []string {
259280 `GATEWAY_SERVICE="nantian-gw-$GATEWAY_NAME"` ,
260281 `SMOKE_CLIENT_POD="smoke-client"` ,
282+ `SMOKE_CLIENT_IMAGE="${SMOKE_CLIENT_IMAGE:-curlimages/curl:` ,
261283 `SMOKE_URL="http://${GATEWAY_SERVICE}.${CONTROL_PLANE_NS}.svc.cluster.local/echo"` ,
262284 `kubectl get service -n "$CONTROL_PLANE_NS" "$GATEWAY_SERVICE"` ,
263285 `kubectl get endpointslice -n "$CONTROL_PLANE_NS"` ,
264286 `kubernetes.io/service-name=$GATEWAY_SERVICE` ,
265- `wget -q -T "$request_timeout" -O - "$SMOKE_URL"` ,
266- `last_request_error` ,
287+ `curl -sS` ,
288+ `last_response_code` ,
289+ `last_response_body` ,
267290 `request_deadline=` ,
268291 } {
269292 if ! strings .Contains (contents , want ) {
@@ -276,11 +299,33 @@ func TestSmokeScriptProbesDerivedGatewayServiceFromInsideCluster(t *testing.T) {
276299 `service/$DATA_PLANE_SVC` ,
277300 `pod/$dataplane_pod` ,
278301 `dataplane_pod=$(kubectl get pod` ,
279- `curl -s -o /dev/null -w "%{http_code}"` ,
280- `wget -q -O - "$SMOKE_URL" >/dev/null 2>&1` ,
302+ `docker.io/busybox:1.36.1` ,
303+ `wget -q -T "$request_timeout" -O - "$SMOKE_URL"` ,
304+ } {
305+ if strings .Contains (contents , unwanted ) {
306+ t .Fatalf ("smoke script still contains stale probe pattern %q" , unwanted )
307+ }
308+ }
309+ }
310+
311+ func TestEmbeddedProtoGoModuleAvoidsKnownVulnerableIndirectDeps (t * testing.T ) {
312+ contents := string (readFile (t , repoPath ("gen" , "go" , "go.mod" )))
313+
314+ for _ , want := range []string {
315+ `golang.org/x/net v0.55.0` ,
316+ `golang.org/x/sys v0.45.0` ,
317+ } {
318+ if ! strings .Contains (contents , want ) {
319+ t .Fatalf ("embedded proto go.mod missing %q" , want )
320+ }
321+ }
322+
323+ for _ , unwanted := range []string {
324+ `golang.org/x/net v0.49.0` ,
325+ `golang.org/x/sys v0.40.0` ,
281326 } {
282327 if strings .Contains (contents , unwanted ) {
283- t .Fatalf ("smoke script still contains stale host-probe pattern %q" , unwanted )
328+ t .Fatalf ("embedded proto go.mod still contains vulnerable dep %q" , unwanted )
284329 }
285330 }
286331}
0 commit comments