@@ -227,6 +227,22 @@ func NewConformanceTestSuite(options ConformanceOptions) (*ConformanceTestSuite,
227
227
return nil , fmt .Errorf ("no supported features were determined for test suite" )
228
228
}
229
229
230
+ extendedSupportedFeatures := make (map [ConformanceProfileName ]FeaturesSet , 0 )
231
+ extendedUnsupportedFeatures := make (map [ConformanceProfileName ]FeaturesSet , 0 )
232
+
233
+ for _ , conformanceProfileName := range options .ConformanceProfiles .UnsortedList () {
234
+ conformanceProfile , err := getConformanceProfileForName (conformanceProfileName )
235
+ if err != nil {
236
+ return nil , fmt .Errorf ("failed to retrieve conformance profile: %w" , err )
237
+ }
238
+ // the use of a conformance profile implicitly enables any features of
239
+ // that profile which are supported at a Core level of support.
240
+ supportedFeatures = supportedFeatures .Union (conformanceProfile .CoreFeatures )
241
+
242
+ extendedSupportedFeatures [conformanceProfileName ] = conformanceProfile .ExtendedFeatures .Intersection (supportedFeatures )
243
+ extendedUnsupportedFeatures [conformanceProfileName ] = conformanceProfile .ExtendedFeatures .Difference (supportedFeatures )
244
+ }
245
+
230
246
config .SetupTimeoutConfig (& options .TimeoutConfig )
231
247
232
248
roundTripper := options .RoundTripper
@@ -284,8 +300,8 @@ func NewConformanceTestSuite(options ConformanceOptions) (*ConformanceTestSuite,
284
300
UsableNetworkAddresses : options .UsableNetworkAddresses ,
285
301
UnusableNetworkAddresses : options .UnusableNetworkAddresses ,
286
302
results : make (map [string ]testResult ),
287
- extendedUnsupportedFeatures : make ( map [ ConformanceProfileName ]sets. Set [features. FeatureName ]) ,
288
- extendedSupportedFeatures : make ( map [ ConformanceProfileName ]sets. Set [features. FeatureName ]) ,
303
+ extendedUnsupportedFeatures : extendedUnsupportedFeatures ,
304
+ extendedSupportedFeatures : extendedSupportedFeatures ,
289
305
conformanceProfiles : options .ConformanceProfiles ,
290
306
implementation : options .Implementation ,
291
307
mode : mode ,
@@ -295,37 +311,6 @@ func NewConformanceTestSuite(options ConformanceOptions) (*ConformanceTestSuite,
295
311
Hook : options .Hook ,
296
312
}
297
313
298
- for _ , conformanceProfileName := range options .ConformanceProfiles .UnsortedList () {
299
- conformanceProfile , err := getConformanceProfileForName (conformanceProfileName )
300
- if err != nil {
301
- return nil , fmt .Errorf ("failed to retrieve conformance profile: %w" , err )
302
- }
303
- // the use of a conformance profile implicitly enables any features of
304
- // that profile which are supported at a Core level of support.
305
- for _ , f := range conformanceProfile .CoreFeatures .UnsortedList () {
306
- if ! options .SupportedFeatures .Has (f ) {
307
- suite .SupportedFeatures .Insert (f )
308
- }
309
- }
310
- for _ , f := range conformanceProfile .ExtendedFeatures .UnsortedList () {
311
- if options .SupportedFeatures .Has (f ) {
312
- if suite .extendedSupportedFeatures [conformanceProfileName ] == nil {
313
- suite .extendedSupportedFeatures [conformanceProfileName ] = FeaturesSet {}
314
- }
315
- suite .extendedSupportedFeatures [conformanceProfileName ].Insert (f )
316
- } else {
317
- if suite .extendedUnsupportedFeatures [conformanceProfileName ] == nil {
318
- suite .extendedUnsupportedFeatures [conformanceProfileName ] = FeaturesSet {}
319
- }
320
- suite .extendedUnsupportedFeatures [conformanceProfileName ].Insert (f )
321
- }
322
- // Add Exempt Features into unsupported features list
323
- if options .ExemptFeatures .Has (f ) {
324
- suite .extendedUnsupportedFeatures [conformanceProfileName ].Insert (f )
325
- }
326
- }
327
- }
328
-
329
314
// apply defaults
330
315
if suite .BaseManifests == "" {
331
316
suite .BaseManifests = "base/manifests.yaml"
0 commit comments