Skip to content

Commit

Permalink
Reselected k8s sanity test cases and marked test cases for k8s ci sanity
Browse files Browse the repository at this point in the history
Closes-bug: #1768437

Change-Id: I3bc89f494680047a491311d3c71855418d9a1f4f
  • Loading branch information
pulkitt committed May 4, 2018
1 parent 43bef9c commit 37f557c
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 21 deletions.
4 changes: 4 additions & 0 deletions docker/base/entrypoint.sh
Expand Up @@ -86,6 +86,10 @@ else
$run_tests -T openshift_1 --send-mail -U -t $EXTRA_RUN_TEST_ARGS
rv_run_test=$?
;;
ci_k8s_sanity)
$run_tests -T ci_k8s_sanity --send-mail -U -t $EXTRA_RUN_TEST_ARGS
rv_run_test=$?
;;
vcenter)
$run_tests -T vcenter --send-mail -U -t $EXTRA_RUN_TEST_ARGS
rv_run_test=$?
Expand Down
4 changes: 3 additions & 1 deletion scripts/k8s_scripts/test_deployment.py
Expand Up @@ -4,6 +4,8 @@
import test

class TestPodDeployment(BaseK8sTest):

@test.attr(type=['ci_k8s_sanity'])
@preposttest_wrapper
def test_deployment_1(self):
'''
Expand Down Expand Up @@ -43,7 +45,7 @@ def test_deployment_1(self):
test_pod=client_pod)
# end test_deployment_1

@test.attr(type=['k8s_sanity','openshift_1'])
@test.attr(type=['openshift_1'])
@preposttest_wrapper
def test_deployment_replica_updation(self):
'''
Expand Down
1 change: 0 additions & 1 deletion scripts/k8s_scripts/test_fabric_forwarding.py
Expand Up @@ -81,7 +81,6 @@ def setup_namespaces_pods_for_fabric_test(self, isolation=False,ip_fabric_forwar
return (client1, client2, client3)
#end setup_namespaces_pods_for_fabric_test

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_pod_publicreachability_with_fabric_forwarding_enabled(self):
"""
Expand Down
1 change: 0 additions & 1 deletion scripts/k8s_scripts/test_ingress.py
Expand Up @@ -55,7 +55,6 @@ def test_ingress_1(self):
# end test_service_1

@skip_because(mx_gw = False)
@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_ingress_fanout(self):
'''
Expand Down
4 changes: 3 additions & 1 deletion scripts/k8s_scripts/test_ingress_tls.py
Expand Up @@ -2,6 +2,7 @@
from k8s.ingress import IngressFixture
from tcutils.wrappers import preposttest_wrapper
from tcutils.util import skip_because
import test

class TestIngressTLS(BaseK8sTest):

Expand All @@ -12,7 +13,8 @@ def setUpClass(cls):
@classmethod
def tearDownClass(cls):
super(TestIngressTLS, cls).tearDownClass()


@test.attr(type=['k8s_sanity'])
@skip_because(mx_gw = False)
@preposttest_wrapper
def test_ingress_tls_1(self):
Expand Down
4 changes: 2 additions & 2 deletions scripts/k8s_scripts/test_isolation.py
Expand Up @@ -101,7 +101,7 @@ def test_pods_isolation_negative(self):
assert client3[2].ping_to_ip(client2[0].pod_ip, expectation=False)
#end test_pods_isolation_negative

@test.attr(type=['k8s_sanity','openshift_1'])
@test.attr(type=['openshift_1'])
@preposttest_wrapper
def test_communication_from_isolated_ns_via_service(self):
"""
Expand Down Expand Up @@ -245,7 +245,7 @@ def test_namespace_custom_isolation(self):
assert client2[6].ping_to_ip(client1[6].pod_ip)
#end test_namespace_custom_isolation

@test.attr(type=['k8s_sanity','openshift_1'])
@test.attr(type=['openshift_1'])
@preposttest_wrapper
def test_service_custom_isolation(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion scripts/k8s_scripts/test_pod.py
Expand Up @@ -35,7 +35,7 @@ def test_ping_between_two_pods(self):
assert pod1.ping_to_ip(pod2.pod_ip)
# end test_ping_between_two_pods

@test.attr(type=['k8s_sanity','openshift_1'])
@test.attr(type=['openshift_1', 'ci_k8s_sanity'])
@preposttest_wrapper
def test_ping_between_pods_accross_namespace(self):
'''
Expand Down
5 changes: 1 addition & 4 deletions scripts/k8s_scripts/test_policy.py
Expand Up @@ -698,7 +698,6 @@ def test_ingress_rules_edit(self):
assert self.validate_wget(self.client1_pod_ns2, url)
#end test_ingress_rules_edit

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_multiple_ingress_policies(self):
"""
Expand Down Expand Up @@ -1425,7 +1424,6 @@ def test_egress_rules_edit(self):
assert self.validate_wget(self.client2_pod_ns2, url)
#end test_egress_rules_edit

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_multiple_egress_policies(self):
"""
Expand Down Expand Up @@ -1769,7 +1767,6 @@ def test_ingress_deny_egress_deny_all(self):
assert self.validate_wget(self.client2_pod_ns1, url2, expectation = False)
#end test_ingress_deny_egress_deny_all

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_ingress_egress_on_pod(self):
"""
Expand Down Expand Up @@ -1844,7 +1841,6 @@ def test_ingress_egress_on_pod(self):
assert self.client3_pod_ns3.ping_with_certainty(self.client2_pod_ns3.pod_ip)
#end test_ingress_egress_on_pod

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_ingress_egress_on_namespace(self):
"""
Expand Down Expand Up @@ -2574,6 +2570,7 @@ def test_multiple_values_in_ingress_rule(self):
expectation=False) # This will fail because of namespace rule
assert client2_pod_ns4.ping_with_certainty(client4_pod_ns1.pod_ip)
#end test_multiple_values_in_ingress_rule

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_multiple_values_in_egress_rule(self):
Expand Down
1 change: 0 additions & 1 deletion scripts/k8s_scripts/test_service.py
Expand Up @@ -45,7 +45,6 @@ def test_service_1(self):
test_pod=pod3)
# end test_service_1

@test.attr(type=['k8s_sanity'])
@skip_because(mx_gw = False)
@preposttest_wrapper
def test_service_with_type_loadbalancer(self):
Expand Down
1 change: 0 additions & 1 deletion scripts/k8s_scripts/test_snat.py
Expand Up @@ -79,7 +79,6 @@ def setup_namespaces_pods_for_snat_test(self, isolation=False ,ip_fabric_snat=Fa
return (client1, client2, client3)
#end setup_namespaces_pods_for_snat_test

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_pod_publicreachability_with_snat_enabled(self):
"""
Expand Down
1 change: 0 additions & 1 deletion serial_scripts/k8s_scripts/test_fabric_forwarding.py
Expand Up @@ -121,7 +121,6 @@ def test_fabric_fwd_pod_restart(self):
self.verify_ping_between_pods_across_namespaces_and_public_network(client1, client2, client3)
#end test_fabric_fwd_pod_restart

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_fabric_fwd_with_docker_restart_on_slave(self):
"""
Expand Down
Expand Up @@ -102,6 +102,7 @@ def verify_ping_between_pods_across_namespaces_and_public_network(self, client1,
assert client1[0].ping_to_ip(client3[0].pod_ip, expectation=False)
assert client1[0].ping_to_ip(client4[0].pod_ip, expectation=False)

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_snat_with_kube_manager_restart(self):
"""
Expand All @@ -121,6 +122,7 @@ def test_snat_with_kube_manager_restart(self):

#end test_snat_with_kube_manager_restart

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_snat_with_vrouter_agent_restart(self):
"""
Expand Down Expand Up @@ -214,6 +216,7 @@ def test_snat_with_kubelet_restart_on_master(self):
client3, client4)
#end test_snat_with_kubelet_restart_on_master

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_snat_with_docker_restart_on_master(self):
"""
Expand Down
6 changes: 2 additions & 4 deletions serial_scripts/k8s_scripts/test_isolation.py
Expand Up @@ -81,7 +81,7 @@ def setup_common_namespaces_pods(self, prov_service = False, prov_ingress = Fals
return (client1, client2, client3)
#end setup_common_namespaces_pods

@test.attr(type=['k8s_sanity','openshift_1'])
@test.attr(type=['openshift_1'])
@preposttest_wrapper
def test_pods_isolation_post_kube_manager_restart(self):
"""
Expand Down Expand Up @@ -137,7 +137,6 @@ def test_service_isolation_post_kube_manager_restart(self):
test_pod=client3[2], expectation=False)
#end test_service_isolation_post_kube_manager_restart

@test.attr(type=['k8s_sanity'])
@skip_because(mx_gw = False)
@preposttest_wrapper
def test_ingress_isolation_post_kube_manager_restart(self):
Expand All @@ -157,7 +156,6 @@ def test_ingress_isolation_post_kube_manager_restart(self):
assert self.validate_nginx_lb([client3[0], client3[1]], client3[5].external_ips[0])
#end test_ingress_isolation_post_kube_manager_restart

@test.attr(type=['k8s_sanity'])
@skip_because(mx_gw = False)
@preposttest_wrapper
def test_ingress_isolation_vrouter_agent_restart(self):
Expand Down Expand Up @@ -433,7 +431,7 @@ def test_ingress_reachability_across_projects(self):
assert self.validate_nginx_lb([client2[0], client2[1]], client2[5].external_ips[0])
# end test_ingress_reachability_across_ns

@test.attr(type=['k8s_sanity','openshift_1'])
@test.attr(type=['openshift_1'])
@preposttest_wrapper
def test_reachability_across_projects_with_isolated_namespace(self):
"""
Expand Down
3 changes: 2 additions & 1 deletion serial_scripts/k8s_scripts/test_km_ha.py
Expand Up @@ -2,7 +2,7 @@
from k8s.pod import PodFixture
from tcutils.wrappers import preposttest_wrapper
from tcutils.contrail_status_check import ContrailStatusChecker

import test

class TestKubeManagerHA(BaseK8sTest):

Expand Down Expand Up @@ -106,6 +106,7 @@ def test_single_node_failover(self):

# end test_single_node_failover

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_km_active_backup(self):
'''
Expand Down
2 changes: 0 additions & 2 deletions serial_scripts/k8s_scripts/test_policy.py
Expand Up @@ -55,7 +55,6 @@ def setup_common_namespaces_pods(self):
return (client1, client2)
#end setup_common_namespaces_pods

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_ingress_policy_over_project_isolation(self):
"""
Expand Down Expand Up @@ -129,7 +128,6 @@ def test_ingress_policy_over_project_isolation(self):
assert self.validate_wget(ns2_clients[0], url1)
#end test_ingress_policy_over_project_isolation

@test.attr(type=['k8s_sanity'])
@preposttest_wrapper
def test_egress_policy_over_project_isolation(self):
"""
Expand Down

0 comments on commit 37f557c

Please sign in to comment.