Skip to content

Commit 5dc4fbe

Browse files
committed
e2e: Quick and simple test case.
1 parent 104ff06 commit 5dc4fbe

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
// Simple and quick test case, used to verify that the E2E framework is available.
31+
var _ = Describe("Namespece test", func() {
32+
f := framework.NewFramework("mc-1")
33+
34+
BeforeEach(func() {
35+
By("before each")
36+
})
37+
38+
It("test list namespace", func() {
39+
namespaces, err := f.ClientSet.CoreV1().Namespaces().List(context.TODO(), metav1.ListOptions{})
40+
Expect(err).Should(BeNil())
41+
Expect(len(namespaces.Items)).ShouldNot(BeZero())
42+
for _, ns := range namespaces.Items {
43+
fmt.Fprintln(GinkgoWriter, ns.Name)
44+
}
45+
})
46+
})

0 commit comments

Comments
 (0)