INNER CODE UNIT · Go
Test_fieldIsMandatory
fluxcd/flagger · pkg/canary/config_tracker_test.go:396
func Test_fieldIsMandatory(t *testing.T) {
falsy := false
truthy := true
tests := []struct {
optional *bool
expected bool
}{
{
optional: nil,
expected: true,
},
{
optional: &falsy,
expected: true,
},
{
optional: &truthy,
expected: false,