Skip to content

Commit bb38c9a

Browse files
committed
e2e: Quick and simple test case.
1 parent c1760f4 commit bb38c9a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

test/e2e/namespace/namespace.go

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
Copyright 2021 RadonDB.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package namespace
18+
19+
import (
20+
"context"
21+
"fmt"
22+
23+
. "github.com/onsi/ginkgo"
24+
. "github.com/onsi/gomega"
25+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
26+
27+
"github.com/radondb/radondb-mysql-kubernetes/test/e2e/framework"
28+
)
29+
30+
var _ = Describe("Namespece test", func() {
31+
f := framework.NewFramework("mc-1")
32+
33+
BeforeEach(func() {
34+
By("before each")
35+
})
36+
37+
It("test list namespace", func() {
38+
namespaces, err := f.ClientSet.CoreV1().Namespaces().List(context.TODO(), metav1.ListOptions{})
39+
Expect(err).Should(BeNil())
40+
Expect(len(namespaces.Items)).ShouldNot(BeZero())
41+
for _, ns := range namespaces.Items {
42+
fmt.Fprintln(GinkgoWriter, ns.Name)
43+
}
44+
})
45+
})

0 commit comments

Comments
 (0)