Skip to content

Commit

Permalink
ensure fuzzer for Info.Title is nonempty
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Zielenski committed Mar 10, 2022
1 parent a373b1a commit a9971bd
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pkg/validation/spec/gnostic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func gnosticCommonTest(t testing.TB, fuzzer *fuzz.Fuzzer) {
*v = &Info{}
c.FuzzNoCustom(*v)

(*v).Title = c.RandString()
(*v).Title = c.RandString() + "x"
},
func (v *Extensions, c fuzz.Continue) {
// gnostic parser only picks up x- vendor extensions
Expand Down Expand Up @@ -397,6 +397,19 @@ func TestGnosticConversionSmallDeterministic4(t *testing.T) {
)
}

func TestGnosticConversionSmallDeterministic5(t *testing.T) {
// A failed case of TestGnosticConversionSmallRandom
// which failed during development/testing loop
gnosticCommonTest(
t,
fuzz.
NewWithSeed(1646940131).
NilChance(0.8).
MaxDepth(10).
NumElements(1, 2),
)
}


func TestGnosticConversionSmallRandom(t *testing.T) {
seed := time.Now().Unix()
Expand Down

0 comments on commit a9971bd

Please sign in to comment.