Skip to content

Commit

Permalink
test: Move assert inside function to pick up subtest names
Browse files Browse the repository at this point in the history
  • Loading branch information
bcl committed Dec 13, 2024
1 parent 47fd20f commit 755dd61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/distro/distro_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ func TestImageTypePipelineNames(t *testing.T) {
Pipelines []pipeline `json:"pipelines"`
}

assert := assert.New(t)
distroFactory := distrofactory.NewDefault()
distros := listTestedDistros(t)
for _, distroName := range distros {
d := distroFactory.GetDistro(distroName)
for _, archName := range d.ListArches() {
arch, err := d.GetArch(archName)
assert.Nil(err)
assert.Nil(t, err)
for _, imageTypeName := range arch.ListImageTypes() {
t.Run(fmt.Sprintf("%s/%s/%s", distroName, archName, imageTypeName), func(t *testing.T) {
assert := assert.New(t)
imageType, err := arch.GetImageType(imageTypeName)
assert.Nil(err)

Expand Down

0 comments on commit 755dd61

Please sign in to comment.