image-builder
image-builder copied to clipboard
Goss tests broken on anything that does not define OS_VERSION
What steps did you take and what happened:
Build a Flatcar image for QEMU
What did you expect to happen:
Successful goss test run
Anything else you would like to add:
This appears to be broken since #1062 was merged. This PR removes the conditional in images/capi/packer/goss/goss-package.yaml that restricted this test to ova
Goss tests now fail on anything that does not use ova/sig/vhd / does not define OS_VERSION
==> qemu: Running goss tests...
==> qemu: Running GOSS render command: cd /tmp/goss && /tmp/goss-0.3.16-linux-amd64 --gossfile goss/goss.yaml --vars /tmp/goss/goss-vars.yaml --vars-inline '{"ARCH":"amd64","OS":"flatcar","PROVIDER":"qemu","containerd_version":"1.6.15","kubernetes_cni_deb_version":"1.2.0-00","kubernetes_cni_rpm_version":"1.2.0","kubernetes_cni_source_type":"http","kubernetes_cni_version":"1.2.0","kubernetes_deb_version":"1.23.15-00","kubernetes_rpm_version":"1.23.15","kubernetes_source_type":"http","kubernetes_version":"1.25.6"}' render > /tmp/goss-spec.yaml
==> qemu: could not read json data in goss/goss-package.yaml: template: test:60:26: executing "test" at <.Vars.OS_VERSION>: map has no entry for key "OS_VERSION"
==> qemu: Goss render failed
==> qemu: Inspect mode on : proceeding without failing Packer
==> qemu: Running GOSS render debug command: cd /tmp/goss && /tmp/goss-0.3.16-linux-amd64 --gossfile goss/goss.yaml --vars /tmp/goss/goss-vars.yaml --vars-inline '{"ARCH":"amd64","OS":"flatcar","PROVIDER":"qemu","containerd_version":"1.6.15","kubernetes_cni_deb_version":"1.2.0-00","kubernetes_cni_rpm_version":"1.2.0","kubernetes_cni_source_type":"http","kubernetes_cni_version":"1.2.0","kubernetes_deb_version":"1.23.15-00","kubernetes_rpm_version":"1.23.15","kubernetes_source_type":"http","kubernetes_version":"1.25.6"}' render -d > /tmp/debug-goss-spec.yaml
==> qemu: could not read json data in goss/goss-package.yaml: template: test:60:26: executing "test" at <.Vars.OS_VERSION>: map has no entry for key "OS_VERSION"
==> qemu: Goss render debug failed
==> qemu: Inspect mode on : proceeding without failing Packer
==> qemu: Running GOSS validate command: cd /tmp/goss && sudo /tmp/goss-0.3.16-linux-amd64 --gossfile goss/goss.yaml --vars /tmp/goss/goss-vars.yaml --vars-inline '{"ARCH":"amd64","OS":"flatcar","PROVIDER":"qemu","containerd_version":"1.6.15","kubernetes_cni_deb_version":"1.2.0-00","kubernetes_cni_rpm_version":"1.2.0","kubernetes_cni_source_type":"http","kubernetes_cni_version":"1.2.0","kubernetes_deb_version":"1.23.15-00","kubernetes_rpm_version":"1.23.15","kubernetes_source_type":"http","kubernetes_version":"1.25.6"}' validate --retry-timeout 0s --sleep 1s -f json -o pretty
qemu: Error: could not read json data in goss/goss-package.yaml: template: test:60:26: executing "test" at <.Vars.OS_VERSION>: map has no entry for key "OS_VERSION"
==> qemu: Goss validate failed
/kind bug [One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]