Skip to content

Commit

Permalink
Add sample version support on rhtap nightly (#257)
Browse files Browse the repository at this point in the history
Signed-off-by: thepetk <[email protected]>
  • Loading branch information
thepetk authored Dec 13, 2023
1 parent b77c7f9 commit 5c835fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
10 changes: 8 additions & 2 deletions tests/rhtap/rhtap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
15 changes: 10 additions & 5 deletions tests/rhtap/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5c835fb

Please sign in to comment.