Add k8s test case 53/54153/2
authorQiaowei Ren <qiaowei.ren@intel.com>
Tue, 20 Mar 2018 05:44:22 +0000 (13:44 +0800)
committerQiaowei Ren <qiaowei.ren@intel.com>
Wed, 21 Mar 2018 11:57:49 +0000 (19:57 +0800)
Change-Id: I7ef6fd6aa31fae47cca446d31b6b54d13454df9c
Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com>
requirements.txt
setup.cfg
stor4nfv_tests/main.py [deleted file]
stor4nfv_tests/stor4nfv_k8s.py [new file with mode: 0644]

index c290b99..818eef3 100644 (file)
@@ -3,4 +3,5 @@
 # process, which may cause wedges in the gate later.
 opnfv # Apache-2.0
 functest # Apache-2.0
 # process, which may cause wedges in the gate later.
 opnfv # Apache-2.0
 functest # Apache-2.0
+functest-kubernetes # Apache-2.0
 xtesting # Apache-2.0
 xtesting # Apache-2.0
index 0ce95bc..b46a7db 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,7 +5,4 @@ home-page = https://wiki.opnfv.org/display/PROJ/Stor4NFV
 
 [files]
 packages = stor4nfv_tests
 
 [files]
 packages = stor4nfv_tests
-
-[entry_points]
-console_scripts =
-    stor4nfv-test = stor4nfv_tests.main:main
+scripts = stor4nfv_tests/stor4nfv_k8s.py
diff --git a/stor4nfv_tests/main.py b/stor4nfv_tests/main.py
deleted file mode 100644 (file)
index 1bbe352..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-import sys
-
-
-def main():
-    """stor4nfv main"""
-    print ('This is main of stor4nfv test case')
diff --git a/stor4nfv_tests/stor4nfv_k8s.py b/stor4nfv_tests/stor4nfv_k8s.py
new file mode 100644 (file)
index 0000000..541cf36
--- /dev/null
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+#
+# Copyright (c) 2018 All rights reserved
+# This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+
+import sys
+import os
+import subprocess
+
+import functest_kubernetes.k8stest as k8stest
+
+
+class K8sStor4nfvTest(k8stest.K8sTesting):
+
+    """Stor4NFV Kubernetes test suite"""
+    def __init__(self, **kwargs):
+        if "case_name" not in kwargs:
+            kwargs.get("case_name", 'stor4nfv_k8s')
+        super(K8sStor4nfvTest, self).__init__(**kwargs)
+        self.check_envs()
+        self.cmd = ['/src/k8s.io/kubernetes/cluster/validate-cluster.sh']