mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
test/e2e: Move tests into test/e2e/node package
- assign sig-node ownership - Fix import aliases in test/e2e/node/examples.go - Fix merge conflicts in test/e2e/BUILD Signed-off-by: Navid Shaikh <shaikhnavid14@gmail.com>
This commit is contained in:
parent
4eca18b6b0
commit
e61f790eac
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package e2e
|
package node
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@ -31,9 +31,9 @@ import (
|
|||||||
podutil "k8s.io/kubernetes/pkg/api/v1/pod"
|
podutil "k8s.io/kubernetes/pkg/api/v1/pod"
|
||||||
commonutils "k8s.io/kubernetes/test/e2e/common"
|
commonutils "k8s.io/kubernetes/test/e2e/common"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
"k8s.io/kubernetes/test/e2e/framework/auth"
|
e2eauth "k8s.io/kubernetes/test/e2e/framework/auth"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/framework/testfiles"
|
e2etestfiles "k8s.io/kubernetes/test/e2e/framework/testfiles"
|
||||||
|
|
||||||
"github.com/onsi/ginkgo"
|
"github.com/onsi/ginkgo"
|
||||||
)
|
)
|
||||||
@ -42,7 +42,7 @@ const (
|
|||||||
serverStartTimeout = framework.PodStartTimeout + 3*time.Minute
|
serverStartTimeout = framework.PodStartTimeout + 3*time.Minute
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = framework.KubeDescribe("[Feature:Example]", func() {
|
var _ = SIGDescribe("[Feature:Example]", func() {
|
||||||
f := framework.NewDefaultFramework("examples")
|
f := framework.NewDefaultFramework("examples")
|
||||||
|
|
||||||
var c clientset.Interface
|
var c clientset.Interface
|
||||||
@ -53,17 +53,17 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
|
|||||||
|
|
||||||
// this test wants powerful permissions. Since the namespace names are unique, we can leave this
|
// this test wants powerful permissions. Since the namespace names are unique, we can leave this
|
||||||
// lying around so we don't have to race any caches
|
// lying around so we don't have to race any caches
|
||||||
err := auth.BindClusterRoleInNamespace(c.RbacV1(), "edit", f.Namespace.Name,
|
err := e2eauth.BindClusterRoleInNamespace(c.RbacV1(), "edit", f.Namespace.Name,
|
||||||
rbacv1.Subject{Kind: rbacv1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"})
|
rbacv1.Subject{Kind: rbacv1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"})
|
||||||
framework.ExpectNoError(err)
|
framework.ExpectNoError(err)
|
||||||
|
|
||||||
err = auth.WaitForAuthorizationUpdate(c.AuthorizationV1(),
|
err = e2eauth.WaitForAuthorizationUpdate(c.AuthorizationV1(),
|
||||||
serviceaccount.MakeUsername(f.Namespace.Name, "default"),
|
serviceaccount.MakeUsername(f.Namespace.Name, "default"),
|
||||||
f.Namespace.Name, "create", schema.GroupResource{Resource: "pods"}, true)
|
f.Namespace.Name, "create", schema.GroupResource{Resource: "pods"}, true)
|
||||||
framework.ExpectNoError(err)
|
framework.ExpectNoError(err)
|
||||||
})
|
})
|
||||||
|
|
||||||
framework.KubeDescribe("Liveness", func() {
|
ginkgo.Describe("Liveness", func() {
|
||||||
ginkgo.It("liveness pods should be automatically restarted", func() {
|
ginkgo.It("liveness pods should be automatically restarted", func() {
|
||||||
test := "test/fixtures/doc-yaml/user-guide/liveness"
|
test := "test/fixtures/doc-yaml/user-guide/liveness"
|
||||||
execYaml := readFile(test, "exec-liveness.yaml.in")
|
execYaml := readFile(test, "exec-liveness.yaml.in")
|
||||||
@ -110,7 +110,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
framework.KubeDescribe("Secret", func() {
|
ginkgo.Describe("Secret", func() {
|
||||||
ginkgo.It("should create a pod that reads a secret", func() {
|
ginkgo.It("should create a pod that reads a secret", func() {
|
||||||
test := "test/fixtures/doc-yaml/user-guide/secrets"
|
test := "test/fixtures/doc-yaml/user-guide/secrets"
|
||||||
secretYaml := readFile(test, "secret.yaml")
|
secretYaml := readFile(test, "secret.yaml")
|
||||||
@ -130,7 +130,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
framework.KubeDescribe("Downward API", func() {
|
ginkgo.Describe("Downward API", func() {
|
||||||
ginkgo.It("should create a pod that prints his name and namespace", func() {
|
ginkgo.It("should create a pod that prints his name and namespace", func() {
|
||||||
test := "test/fixtures/doc-yaml/user-guide/downward-api"
|
test := "test/fixtures/doc-yaml/user-guide/downward-api"
|
||||||
podYaml := readFile(test, "dapi-pod.yaml.in")
|
podYaml := readFile(test, "dapi-pod.yaml.in")
|
||||||
@ -152,7 +152,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
|
|||||||
|
|
||||||
func readFile(test, file string) string {
|
func readFile(test, file string) string {
|
||||||
from := filepath.Join(test, file)
|
from := filepath.Join(test, file)
|
||||||
data, err := testfiles.Read(from)
|
data, err := e2etestfiles.Read(from)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
framework.Fail(err.Error())
|
framework.Fail(err.Error())
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user