Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote emptyconfigmap key e2e test to conformance test #72774

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions test/conformance/testdata/conformance.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ test/e2e/auth/service_accounts.go: "should mount an API token into pods"
test/e2e/auth/service_accounts.go: "should allow opting out of API token automount"
test/e2e/common/configmap.go: "should be consumable via environment variable"
test/e2e/common/configmap.go: "should be consumable via the environment"
test/e2e/common/configmap.go: "should fail to create ConfigMap with empty key"
test/e2e/common/configmap_volume.go: "should be consumable from pods in volume"
test/e2e/common/configmap_volume.go: "should be consumable from pods in volume with defaultMode set"
test/e2e/common/configmap_volume.go: "should be consumable from pods in volume as non-root"
Expand Down
12 changes: 9 additions & 3 deletions test/e2e/common/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ package common
import (
"fmt"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/kubernetes/test/e2e/framework"
imageutils "k8s.io/kubernetes/test/utils/image"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

var _ = Describe("[sig-node] ConfigMap", func() {
Expand Down Expand Up @@ -124,7 +125,12 @@ var _ = Describe("[sig-node] ConfigMap", func() {
})
})

It("should fail to create configMap in volume due to empty configmap key", func() {
/*
Release : v1.14
Testname: ConfigMap, with empty-key
Description: Attempt to create a ConfigMap with an empty key. The creation MUST fail.
*/
framework.ConformanceIt("should fail to create ConfigMap with empty key", func() {
configMap, err := newConfigMapWithEmptyKey(f)
Expect(err).To(HaveOccurred(), "created configMap %q with empty key in namespace %q", configMap.Name, f.Namespace.Name)
})
Expand Down