From 2f420fc02985addb81a00df7f9b35e77e94809b5 Mon Sep 17 00:00:00 2001 From: Byounguk Lee Date: Wed, 29 Oct 2025 11:14:26 +0000 Subject: [PATCH] test: Verify and log iso version in iso_test.go Signed-off-by: Byounguk Lee --- test/integration/iso_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/integration/iso_test.go b/test/integration/iso_test.go index 7e16acbc60..46ad7780bf 100644 --- a/test/integration/iso_test.go +++ b/test/integration/iso_test.go @@ -20,6 +20,7 @@ package integration import ( "context" + "encoding/json" "fmt" "os/exec" "runtime" @@ -99,4 +100,21 @@ func TestISOImage(t *testing.T) { }) } }) + + t.Run("VersionJSON", func(t *testing.T) { + rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", "cat /version.json")) + if err != nil { + t.Fatalf("failed to read /version.json. args %q: %v", rr.Command(), err) + } + + var data map[string]string + if err := json.Unmarshal(rr.Stdout.Bytes(), &data); err != nil { + t.Fatalf("failed to parse /version.json as JSON: %v. \nContent: %s", err, rr.Stdout) + } + + t.Logf("Successfully parsed /version.json:") + for k, v := range data { + t.Logf(" %s: %s", k, v) + } + }) }