@@ -78,6 +78,23 @@ var StandardCoreFeatures = map[SupportedFeature]bool{
78
78
SupportReferenceGrant : true ,
79
79
}
80
80
81
+ // AllFeatures contains all the supported features and can be used to run all
82
+ // conformance tests with `all-features` flag.
83
+ var AllFeatures = map [SupportedFeature ]bool {
84
+ SupportReferenceGrant : true ,
85
+ SupportTLSRoute : true ,
86
+ SupportHTTPRouteQueryParamMatching : true ,
87
+ SupportHTTPRouteMethodMatching : true ,
88
+ SupportHTTPResponseHeaderModification : true ,
89
+ SupportRouteDestinationPortMatching : true ,
90
+ SupportGatewayClassObservedGenerationBump : true ,
91
+ SupportHTTPRoutePortRedirect : true ,
92
+ SupportHTTPRouteSchemeRedirect : true ,
93
+ SupportHTTPRoutePathRedirect : true ,
94
+ SupportHTTPRouteHostRewrite : true ,
95
+ SupportHTTPRoutePathRewrite : true ,
96
+ }
97
+
81
98
// ConformanceTestSuite defines the test suite used to run Gateway API
82
99
// conformance tests.
83
100
type ConformanceTestSuite struct {
@@ -96,28 +113,26 @@ type ConformanceTestSuite struct {
96
113
97
114
// Options can be used to initialize a ConformanceTestSuite.
98
115
type Options struct {
99
- Client client.Client
100
- GatewayClassName string
101
- Debug bool
102
- RoundTripper roundtripper.RoundTripper
103
- BaseManifests string
104
- NamespaceLabels map [string ]string
116
+ Client client.Client
117
+ GatewayClassName string
118
+ Debug bool
119
+ RoundTripper roundtripper.RoundTripper
120
+ BaseManifests string
121
+ NamespaceLabels map [string ]string
105
122
// ValidUniqueListenerPorts maps each listener port of each Gateway in the
106
123
// manifests to a valid, unique port. There must be as many
107
124
// ValidUniqueListenerPorts as there are listeners in the set of manifests.
108
125
// For example, given two Gateways, each with 2 listeners, there should be
109
126
// four ValidUniqueListenerPorts.
110
127
// If empty or nil, ports are not modified.
111
- ValidUniqueListenerPorts []v1beta1.PortNumber
128
+ ValidUniqueListenerPorts []v1beta1.PortNumber
112
129
113
130
// CleanupBaseResources indicates whether or not the base test
114
131
// resources such as Gateways should be cleaned up after the run.
115
- CleanupBaseResources bool
116
- SupportedFeatures map [SupportedFeature ]bool
117
- TimeoutConfig config.TimeoutConfig
118
- // SkipTests contains all the tests not to be run and can be used to opt out
119
- // of specific tests
120
- SkipTests []string
132
+ CleanupBaseResources bool
133
+ SupportedFeatures map [SupportedFeature ]bool
134
+ EnableAllSupportedFeatures bool
135
+ TimeoutConfig config.TimeoutConfig
121
136
}
122
137
123
138
// New returns a new ConformanceTestSuite.
@@ -129,7 +144,9 @@ func New(s Options) *ConformanceTestSuite {
129
144
roundTripper = & roundtripper.DefaultRoundTripper {Debug : s .Debug , TimeoutConfig : s .TimeoutConfig }
130
145
}
131
146
132
- if s .SupportedFeatures == nil {
147
+ if s .EnableAllSupportedFeatures == true {
148
+ s .SupportedFeatures = AllFeatures
149
+ } else if s .SupportedFeatures == nil {
133
150
s .SupportedFeatures = StandardCoreFeatures
134
151
} else {
135
152
for feature , val := range StandardCoreFeatures {
0 commit comments