Skip to content

Commit

Permalink
test-e2e: Add check for validating kbs image and kbs image tag
Browse files Browse the repository at this point in the history
Validate kbs image and kbs image tag only when deploy kbs is
enabled.

Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
  • Loading branch information
kartikjoshi21 committed Mar 4, 2024
1 parent 5fb75bc commit 789ec85
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/e2e/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,12 @@ func TestMain(m *testing.M) {
var err error

// Get properties
props := provisioner.GetProperties(ctx, cfg)
if props["KBS_IMAGE"] == "" || props["KBS_IMAGE_TAG"] == "" {
return ctx, fmt.Errorf("kbs image not provided")

if shouldDeployKbs {
props := provisioner.GetProperties(ctx, cfg)
if props["KBS_IMAGE"] == "" || props["KBS_IMAGE_TAG"] == "" {
return ctx, fmt.Errorf("kbs image not provided")
}
}

if shouldProvisionCluster {
Expand Down

0 comments on commit 789ec85

Please sign in to comment.