From: Qiaowei Ren Date: Tue, 20 Mar 2018 05:44:22 +0000 (+0800) Subject: Add k8s test case X-Git-Tag: opnfv-6.0.0~1 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F53%2F54153%2F2;hp=80a855170e1488eeb8cc0833ffba2b1938c327ac;p=stor4nfv.git Add k8s test case Change-Id: I7ef6fd6aa31fae47cca446d31b6b54d13454df9c Signed-off-by: Qiaowei Ren --- diff --git a/requirements.txt b/requirements.txt index c290b99..818eef3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,5 @@ # 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 diff --git a/setup.cfg b/setup.cfg index 0ce95bc..b46a7db 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,7 +5,4 @@ home-page = https://wiki.opnfv.org/display/PROJ/Stor4NFV [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 index 1bbe352..0000000 --- a/stor4nfv_tests/main.py +++ /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 index 0000000..541cf36 --- /dev/null +++ b/stor4nfv_tests/stor4nfv_k8s.py @@ -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']