3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
17 Library cluster.cluster.Cluster WITH NAME Cluster
18 Library crl.remotesession.remotesession.RemoteSession
19 ... WITH NAME RemoteSession
21 Test Setup Run Keywords
22 ... ssh.Setup Connections
24 Test Teardown Run Keywords
30 ${command}= set variable kubectl create namespace test-ns
31 ${out}= ssh.Execute Command ${command} controller-1
33 Should contain ${out} namespace/test-ns created
35 Create pod in specific namespace
36 ${command}= set variable kubectl run --generator=run-pod/v1 my-pod --image=nginx --port=80 --namespace=test-ns
37 ${out}= ssh.Execute Command ${command} controller-1
39 Should contain ${out} pod/my-pod created
41 Check whether pod was created in specific namespace
42 ${command}= set variable kubectl describe pod my-pod -n test-ns
43 ${out}= ssh.Execute Command ${command} controller-1
45 Should contain ${out} test-ns
48 ${command}= set variable kubectl delete pod my-pod -n test-ns
49 ${out}= ssh.Execute Command ${command} controller-1
51 Should contain ${out} pod "my-pod" deleted
54 ${command}= set variable kubectl delete namespace test-ns
55 ${out}= ssh.Execute Command ${command} controller-1
57 Should contain ${out} namespace "test-ns" deleted
61 Verify creating and testing Namespaces
62 Create pod in specific namespace
63 Check whether pod was created in specific namespace