packer-cn/fix/fixer_test.go

30 lines
452 B
Go
Raw Normal View History

package fix
import (
"testing"
)
func TestFix_allFixersEnabled(t *testing.T) {
f := Fixers
o := FixerOrder
if len(f) != len(o) {
t.Fatalf("Fixers length (%d) does not match FixerOrder length (%d)", len(f), len(o))
}
2020-01-28 16:49:16 -05:00
for fixer := range f {
found := false
for _, orderedFixer := range o {
if orderedFixer == fixer {
found = true
break
}
}
if !found {
t.Fatalf("Did not find Fixer %s in FixerOrder", fixer)
}
}
}