Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
test(testenv): fix broken tests (#1148)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgacsal authored Feb 1, 2024
1 parent e9bd76d commit 0fece9f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions testenv/docker/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func TestProjectFromConfig(t *testing.T) {
Scanner: "openclarity/vmclarity-cli:latest",
},
ComposeFiles: []string{
"../../../../installation/docker/docker-compose.yml",
"docker-compose.override.yml",
"../../installation/docker/docker-compose.yml",
"asset/docker-compose.override.yml",
},
},
ExpectedServiceImages: map[string]string{
Expand Down
21 changes: 13 additions & 8 deletions testenv/kubernetes/helm/chart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package helm

import (
"fmt"
"testing"

. "github.com/onsi/gomega"
Expand Down Expand Up @@ -44,17 +43,18 @@ func TestChartWithContainerImages(t *testing.T) {
KubeConfigPath: "kubeconfig",
},
ContainerImagesMap: map[string]string{
"apiserver_image": "openclarity.io/vmclarity-apiserver",
"orchestrator_image": "openclarity.io/vmclarity-orchestrator:test@sha256:96374b22a50bcfc96b96b5153b185ce5bf16d7a454766747633a32d2f1fefead",
"ui_image": "ghcr.io/openclarity/vmclarity-ui:test",
"uibackend_image": "openclarity.io/vmclarity-uibackend:test",
"scanner_image": "vmclarity-scanner:test",
"apiserver_image": "openclarity.io/vmclarity-apiserver",
"orchestrator_image": "openclarity.io/vmclarity-orchestrator:test@sha256:96374b22a50bcfc96b96b5153b185ce5bf16d7a454766747633a32d2f1fefead",
"ui_image": "ghcr.io/openclarity/vmclarity-ui:test",
"uibackend_image": "openclarity.io/vmclarity-uibackend:test",
"scanner_image": "vmclarity-scanner:test",
"cr_discovery_server_image": "openclarity.io/vmclarity-cr-discovery-server:test",
},
ExpectedValues: map[string]map[string]string{
"apiserver.image": {
"registry": "openclarity.io",
"repository": "vmclarity-apiserver",
"tag": "",
"tag": "latest",
},
"orchestrator.image": {
"registry": "openclarity.io",
Expand Down Expand Up @@ -83,6 +83,11 @@ func TestChartWithContainerImages(t *testing.T) {
"repository": "vmclarity-uibackend",
"tag": "test",
},
"crDiscoveryServer.image": {
"registry": "openclarity.io",
"repository": "vmclarity-cr-discovery-server",
"tag": "test",
},
},
},
}
Expand All @@ -106,7 +111,7 @@ func TestChartWithContainerImages(t *testing.T) {

yaml, err := values.YAML()
g.Expect(err).Should(Not(HaveOccurred()))
fmt.Println(yaml)
t.Logf("values YAML: %v", yaml)

for subSection, expectedValues := range test.ExpectedValues {
t.Logf("with subsection: %s", subSection)
Expand Down
2 changes: 1 addition & 1 deletion testenv/kubernetes/helm/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
. "github.com/onsi/gomega"
)

var HelmChartDir = "../../../../installation/kubernetes/helm/vmclarity"
var HelmChartDir = "../../../installation/kubernetes/helm/vmclarity"

func TestLoader(t *testing.T) {
tests := []struct {
Expand Down

0 comments on commit 0fece9f

Please sign in to comment.