File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,6 +130,13 @@ func getIsoTestOpts(testName string) IsoTestOpts {
130130 return opts
131131}
132132
133+ func CheckLiveArtifactsExist () error {
134+ if kola .CosaBuild .Meta .BuildArtifacts .LiveIso == nil || kola .CosaBuild .Meta .BuildArtifacts .LiveKernel == nil || kola .CosaBuild .Meta .BuildArtifacts .LiveInitramfs == nil || kola .CosaBuild .Meta .BuildArtifacts .LiveRootfs == nil {
135+ return fmt .Errorf ("Build %s is missing live artifacts\n " , kola .CosaBuild .Meta .Name )
136+ }
137+ return nil
138+ }
139+
133140func IsDevBuild () bool {
134141 // Ignore signing verification by default when running with development build
135142 // https://github.com/coreos/fedora-coreos-tracker/issues/908
Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ func init() {
4444}
4545
4646func isoTestAsDisk (c cluster.TestCluster , opts IsoTestOpts ) {
47+ if err := CheckLiveArtifactsExist (); err != nil {
48+ c .Fatal (err )
49+ }
4750 qc , ok := c .Cluster .(* qemu.Cluster )
4851 if ! ok {
4952 c .Fatalf ("Unsupported cluster type" )
Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ ExecStart=grep FIPS etc/crypto-policies/config
5151RequiredBy=fips-signal-ok.service`
5252
5353func testLiveFIPS (c cluster.TestCluster , opts IsoTestOpts ) {
54+ if err := CheckLiveArtifactsExist (); err != nil {
55+ c .Fatal (err )
56+ }
5457 qc , ok := c .Cluster .(* qemu.Cluster )
5558 if ! ok {
5659 c .Fatalf ("Unsupported cluster type" )
Original file line number Diff line number Diff line change @@ -106,6 +106,9 @@ var iscsi_butane_config string
106106// - when the system is booted, write a success string to /dev/virtio-ports/testisocompletion
107107// - as this serial device is mapped to the host serial device, the test concludes
108108func isoInstalliScsi (c cluster.TestCluster , opts IsoTestOpts ) {
109+ if err := CheckLiveArtifactsExist (); err != nil {
110+ c .Fatal (err )
111+ }
109112 qc , ok := c .Cluster .(* qemu.Cluster )
110113 if ! ok {
111114 c .Fatalf ("Unsupported cluster type" )
Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ func init() {
100100}
101101
102102func runLiveIsoInstallTest (c cluster.TestCluster , opts IsoTestOpts ) {
103+ if err := CheckLiveArtifactsExist (); err != nil {
104+ c .Fatal (err )
105+ }
103106 if opts .isMiniso && opts .isOffline { // ideally this'd be one enum parameter
104107 c .Fatal ("Can't run minimal install offline" )
105108 }
Original file line number Diff line number Diff line change @@ -71,10 +71,9 @@ func init() {
7171}
7272
7373func testLiveLogin (c cluster.TestCluster , firmware string ) {
74- if kola . CosaBuild . Meta . BuildArtifacts . LiveIso == nil || kola . CosaBuild . Meta . BuildArtifacts . LiveKernel = = nil {
75- c .Fatalf ( "Build %s is missing live artifacts \n " , kola . CosaBuild . Meta . Name )
74+ if err := CheckLiveArtifactsExist (); err ! = nil {
75+ c .Fatal ( err )
7676 }
77-
7877 butane := conf .Butane (`
7978variant: fcos
8079version: 1.1.0` )
Original file line number Diff line number Diff line change @@ -94,6 +94,9 @@ RequiredBy=coreos-installer.target
9494`
9595
9696func testPXE (c cluster.TestCluster , opts IsoTestOpts ) {
97+ if err := CheckLiveArtifactsExist (); err != nil {
98+ c .Fatal (err )
99+ }
97100 qc , ok := c .Cluster .(* qemu.Cluster )
98101 if ! ok {
99102 c .Fatalf ("Unsupported cluster type" )
You can’t perform that action at this time.
0 commit comments