Skip to content

Commit 52ec314

Browse files
authored
Fix that allows to --all-features and --exempt-features flags work together (#4149)
* Cover case when --all-features and --exempt-features flags are supplied. * Added unit test. * Sync with head * Typo.
1 parent ec84d0a commit 52ec314

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

conformance/utils/suite/suite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ func NewConformanceTestSuite(options ConformanceOptions) (*ConformanceTestSuite,
206206
supportedFeatures := options.SupportedFeatures.Difference(options.ExemptFeatures)
207207
source := supportedFeaturesSourceManual
208208
if options.EnableAllSupportedFeatures {
209-
supportedFeatures = features.SetsToNamesSet(features.AllFeatures)
209+
supportedFeatures = features.SetsToNamesSet(features.AllFeatures).Difference(options.ExemptFeatures)
210210
} else if shouldInferSupportedFeatures(&options) {
211211
var err error
212212
if options.GatewayClassName != "" {

conformance/utils/suite/suite_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,13 @@ func TestInferGWCSupportedFeatures(t *testing.T) {
487487
}),
488488
},
489489
},
490+
{
491+
name: "all features combined with exempt features",
492+
allowAllFeatures: true,
493+
exemptFeatures: sets.New[features.FeatureName]("ReferenceGrant", "HTTPRoute"),
494+
expectedSource: supportedFeaturesSourceManual,
495+
expectedFeatures: features.SetsToNamesSet(features.AllFeatures).Difference(sets.New[features.FeatureName]("ReferenceGrant", "HTTPRoute")),
496+
},
490497
}
491498

492499
gwcName := "ochopintre"

0 commit comments

Comments
 (0)