Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample version support on rhtap nightly #257

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading