Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed installing traffic to each VM and creating unique policy name fo... #472

Open
wants to merge 2 commits into
base: test_parallelism
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions scripts/securitygroup/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from policy.config import ConfigPolicy
from security_group import SecurityGroupFixture
from common import isolated_creds
from util import get_random_name


class BaseSGTest(test.BaseTestCase):
Expand Down Expand Up @@ -139,13 +140,13 @@ def verify_sg_test_resources(self):
self.logger.debug("Verify the configured VM's.")
assert self.multi_vm_fixture.verify_on_setup()

self.logger.info("Installing traffic package in VM.")
'''self.logger.info("Installing traffic package in VM.")
self.vm1_fix.install_pkg("Traffic")
self.vm2_fix.install_pkg("Traffic")
self.vm3_fix.install_pkg("Traffic")
self.vm4_fix.install_pkg("Traffic")
self.vm5_fix.install_pkg("Traffic")
self.vm6_fix.install_pkg("Traffic")
self.vm6_fix.install_pkg("Traffic")'''

self.logger.debug("Verify the configured security groups.")
result, msg = self.sg1_fix.verify_on_setup()
Expand Down Expand Up @@ -186,7 +187,8 @@ def remove_from_cleanups(self, fix):
break

def config_policy_and_attach_to_vn(self, rules):
policy_name = "sec_grp_policy"
randomname = get_random_name()
policy_name = "sec_grp_policy_" + randomname
policy_fix = self.config_policy(policy_name, rules)
assert policy_fix.verify_on_setup()
policy_vn1_attach_fix = self.attach_policy_to_vn(
Expand Down
15 changes: 3 additions & 12 deletions scripts/securitygroup/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from security_group import SecurityGroupFixture
from vn_test import VNFixture
from vm_test import VMFixture
import test


class SecurityGroupRegressionTests1(BaseSGTest, VerifySecGroup, ConfigPolicy):
Expand All @@ -18,13 +19,10 @@ class SecurityGroupRegressionTests1(BaseSGTest, VerifySecGroup, ConfigPolicy):
def setUpClass(cls):
super(SecurityGroupRegressionTests1, cls).setUpClass()

@classmethod
def tearDownClass(cls):
super(SecurityGroupRegressionTests1, cls).tearDownClass()

def runTest(self):
pass

@test.attr(type=['sanity'])
@preposttest_wrapper
def test_sec_group_add_delete(self):
"""Verify security group add delete
Expand All @@ -43,6 +41,7 @@ def test_sec_group_add_delete(self):
self.delete_sec_group(secgrp_fix)
return True

@test.attr(type=['sanity'])
@preposttest_wrapper
def test_vm_with_sec_group(self):
"""Verify attach dettach security group in VM
Expand Down Expand Up @@ -122,10 +121,6 @@ class SecurityGroupRegressionTests2(BaseSGTest, VerifySecGroup, ConfigPolicy):
def setUpClass(cls):
super(SecurityGroupRegressionTests2, cls).setUpClass()

@classmethod
def tearDownClass(cls):
super(SecurityGroupRegressionTests2, cls).tearDownClass()

def setUp(self):
super(SecurityGroupRegressionTests2, self).setUp()
self.create_sg_test_resources()
Expand Down Expand Up @@ -256,10 +251,6 @@ class SecurityGroupRegressionTests3(BaseSGTest, VerifySecGroup, ConfigPolicy):
def setUpClass(cls):
super(SecurityGroupRegressionTests3, cls).setUpClass()

@classmethod
def tearDownClass(cls):
super(SecurityGroupRegressionTests3, cls).tearDownClass()

def setUp(self):
super(SecurityGroupRegressionTests3, self).setUp()
self.create_sg_test_resources()
Expand Down
9 changes: 5 additions & 4 deletions scripts/securitygroup/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import sys
from time import sleep
from util import retry
sys.path.append(os.path.realpath('tcutils/pkgs/Traffic'))
from tcutils.pkgs.Traffic.traffic.core.stream import Stream
from tcutils.pkgs.Traffic.traffic.core.helpers import Host, Sender, Receiver
from tcutils.pkgs.Traffic.traffic.core.profile import StandardProfile,\
from util import get_random_name
sys.path.append(os.path.realpath('scripts/tcutils/pkgs/Traffic'))
from traffic.core.stream import Stream
from traffic.core.helpers import Host, Sender, Receiver
from traffic.core.profile import StandardProfile,\
ContinuousProfile


Expand Down