Skip to content

Commit

Permalink
Fix the naming convention in the config-features.yaml (#7743)
Browse files Browse the repository at this point in the history
* Fix the naming convention in the config-features.yaml, to prevent error in yq when yaml parsing happens

Signed-off-by: Leo Li <leoli@redhat.com>

* Fix the naming convention in the config-features.yaml, to prevent error in yq when yaml parsing happens

Signed-off-by: Leo Li <leoli@redhat.com>

* fix the failing unit tests

Signed-off-by: Leo Li <leoli@redhat.com>

---------

Signed-off-by: Leo Li <leoli@redhat.com>
  • Loading branch information
Leo6Leo committed Mar 6, 2024
1 parent c9de4b5 commit 42da1e1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/feature/flag_names.go
Expand Up @@ -25,5 +25,5 @@ const (
TransportEncryption = "transport-encryption"
EvenTypeAutoCreate = "eventtype-auto-create"
OIDCAuthentication = "authentication-oidc"
NodeSelectorLabel = "apiserversources.nodeselector."
NodeSelectorLabel = "apiserversources-nodeselector-"
)
6 changes: 3 additions & 3 deletions pkg/apis/feature/testdata/config-features.yaml
Expand Up @@ -25,6 +25,6 @@ data:
my-enabled-flag: "enabled"
my-disabled-flag: "disabled"
my-allowed-flag: "allowed"
apiserversources.nodeselector.testkey: testvalue
apiserversources.nodeselector.testkey1: testvalue1
apiserversources.nodeselector.testkey2: testvalue2
apiserversources-nodeselector-testkey: testvalue
apiserversources-nodeselector-testkey1: testvalue1
apiserversources-nodeselector-testkey2: testvalue2
4 changes: 2 additions & 2 deletions pkg/reconciler/apiserversource/apiserversource_test.go
Expand Up @@ -1089,8 +1089,8 @@ func TestReconcile(t *testing.T) {
Name: "Valid with nodeSelector",

Ctx: feature.ToContext(context.Background(), feature.Flags{
"apiserversources.nodeselector.testkey1": "testvalue1",
"apiserversources.nodeselector.testkey2": "testvalue2",
"apiserversources-nodeselector-testkey1": "testvalue1",
"apiserversources-nodeselector-testkey2": "testvalue2",
}),
Objects: []runtime.Object{
rttestingv1.NewApiServerSource(sourceName, testNS,
Expand Down
6 changes: 3 additions & 3 deletions test/rekt/resources/configmap/config-features.yaml
Expand Up @@ -11,7 +11,7 @@ data:
my-enabled-flag: "enabled"
my-disabled-flag: "disabled"
my-allowed-flag: "allowed"
apiserversources.nodeselector.testkey: testvalue
apiserversources.nodeselector.testkey1: testvalue1
apiserversources.nodeselector.testkey2: testvalue2
apiserversources-nodeselector-testkey: testvalue
apiserversources-nodeselector-testkey1: testvalue1
apiserversources-nodeselector-testkey2: testvalue2

0 comments on commit 42da1e1

Please sign in to comment.