diff --git a/tests/rhtap/rhtap_test.go b/tests/rhtap/rhtap_test.go index 2e213b38..fde12fec 100644 --- a/tests/rhtap/rhtap_test.go +++ b/tests/rhtap/rhtap_test.go @@ -87,8 +87,14 @@ var _ = Describe("RHTAP sample checks", Ordered, Label("nightly"), func() { }) It("creates componentdetectionquery", func() { - cdq, err = fw.HasController.CreateComponentDetectionQuery(sampleEntry.Name, testNamespace, sampleEntry.Git.Remotes.Origin, "", "", "", false) - Expect(err).NotTo(HaveOccurred()) + for _, sampleEntryVersion := range sampleEntry.Versions { + if sampleEntryVersion.Default { + sampleEntryGit := sampleEntryVersion.Git.Remotes.Origin + cdq, err = fw.HasController.CreateComponentDetectionQuery(sampleEntry.Name, testNamespace, sampleEntryGit, "", "", "", false) + Expect(err).NotTo(HaveOccurred()) + break + } + } }) It("creates component", func() { diff --git a/tests/rhtap/types.go b/tests/rhtap/types.go index dd4fc3f8..f9d767c5 100644 --- a/tests/rhtap/types.go +++ b/tests/rhtap/types.go @@ -15,12 +15,17 @@ type Git struct { Remotes Remotes `yaml:"remotes"` } +type Version struct { + Default bool `yaml:"default"` + Git Git `yaml:"git"` +} + type SampleEntry struct { - Name string `yaml:"name"` - DisplayName string `yaml:"displayName"` - Language string `yaml:"language"` - ProjectType string `yaml:"projectType"` - Git Git `yaml:"git"` + Name string `yaml:"name"` + DisplayName string `yaml:"displayName"` + Language string `yaml:"language"` + ProjectType string `yaml:"projectType"` + Versions []Version `yaml:"versions"` } type ExtraDevfileEntries struct {