Skip to content

Commit 438e647

Browse files
authored
Merge pull request #21821 from nimdrak/21815
test: Verify and log iso version in iso_test.go
2 parents ef4b565 + c6bf01f commit 438e647

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/integration/iso_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ package integration
2020

2121
import (
2222
"context"
23+
"encoding/json"
2324
"fmt"
2425
"os/exec"
2526
"runtime"
@@ -101,6 +102,23 @@ func TestISOImage(t *testing.T) {
101102
}
102103
})
103104

105+
t.Run("VersionJSON", func(t *testing.T) {
106+
rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", "cat /version.json"))
107+
if err != nil {
108+
t.Fatalf("failed to read /version.json. args %q: %v", rr.Command(), err)
109+
}
110+
111+
var data map[string]string
112+
if err := json.Unmarshal(rr.Stdout.Bytes(), &data); err != nil {
113+
t.Fatalf("failed to parse /version.json as JSON: %v. \nContent: %s", err, rr.Stdout)
114+
}
115+
116+
t.Logf("Successfully parsed /version.json:")
117+
for k, v := range data {
118+
t.Logf(" %s: %s", k, v)
119+
}
120+
})
121+
104122
t.Run("eBPFSupport", func(t *testing.T) {
105123
// Ensure that BTF type information is available (https://github.com/kubernetes/minikube/issues/21788)
106124
btfFile := "/sys/kernel/btf/vmlinux"

0 commit comments

Comments
 (0)