diff --git a/tests/OBSLocal.py b/tests/OBSLocal.py index fc498e1e..fe59275c 100644 --- a/tests/OBSLocal.py +++ b/tests/OBSLocal.py @@ -170,7 +170,7 @@ class TestCase(unittest.TestCase): return prefix + ''.join([random.choice(string.ascii_letters) for i in range(length)]) -class StagingWorkflow(object): +class FactoryWorkflow(object): """This class is intended to setup and manipulate the environment (projects, users, etc.) in the local OBS instance used to tests the release tools. It makes easy to setup scenarios similar to the ones used during the real (open)SUSE development, with staging projects, rings, etc. diff --git a/tests/ReviewBot_tests.py b/tests/ReviewBot_tests.py index e699c3b7..a2f8e9af 100644 --- a/tests/ReviewBot_tests.py +++ b/tests/ReviewBot_tests.py @@ -11,7 +11,7 @@ class TestReviewBotComment(OBSLocal.TestCase): def setUp(self): super(TestReviewBotComment, self).setUp() self.api = CommentAPI(self.apiurl) - self.wf = OBSLocal.StagingWorkflow() + self.wf = OBSLocal.FactoryWorkflow() self.wf.create_user('factory-auto') self.project = self.wf.create_project(PROJECT) diff --git a/tests/accept_tests.py b/tests/accept_tests.py index 38e0a4f5..6f5a9673 100644 --- a/tests/accept_tests.py +++ b/tests/accept_tests.py @@ -13,7 +13,7 @@ from . import OBSLocal class TestAccept(unittest.TestCase): def setup_wf(self): - wf = OBSLocal.StagingWorkflow() + wf = OBSLocal.FactoryWorkflow() wf.setup_rings() self.c_api = CommentAPI(wf.api.apiurl) diff --git a/tests/api_tests.py b/tests/api_tests.py index 15ca9124..665bd42a 100644 --- a/tests/api_tests.py +++ b/tests/api_tests.py @@ -17,7 +17,7 @@ class TestApiCalls(OBSLocal.TestCase): def setUp(self): super(TestApiCalls, self).setUp() - self.wf = OBSLocal.StagingWorkflow() + self.wf = OBSLocal.FactoryWorkflow() self.wf.setup_rings() self.staging_b = self.wf.create_staging('B') prj = self.staging_b.name diff --git a/tests/build_fail_reminder_tests.py b/tests/build_fail_reminder_tests.py index d64bcbba..65193904 100644 --- a/tests/build_fail_reminder_tests.py +++ b/tests/build_fail_reminder_tests.py @@ -5,7 +5,7 @@ class TestBuildFailReminder(OBSLocal.TestCase): script = './build-fail-reminder.py' def test_basic(self): - self.wf = OBSLocal.StagingWorkflow() + self.wf = OBSLocal.FactoryWorkflow() self.wf.create_target() self.execute_script(['--relay', 'smtp', '--sender', 'Tester']) diff --git a/tests/check_source_tests.py b/tests/check_source_tests.py index be50077e..b052a0e3 100644 --- a/tests/check_source_tests.py +++ b/tests/check_source_tests.py @@ -23,8 +23,8 @@ class TestCheckSource(OBSLocal.TestCase): def setUp(self): super(TestCheckSource, self).setUp() - # Using OBSLocal.StagingWorkflow makes it easier to setup testing scenarios - self.wf = OBSLocal.StagingWorkflow(PROJECT) + # Using OBSLocal.FactoryWorkflow makes it easier to setup testing scenarios + self.wf = OBSLocal.FactoryWorkflow(PROJECT) self.project = self.wf.projects[PROJECT] # Set up the reviewers team diff --git a/tests/check_tests.py b/tests/check_tests.py index 47bda11b..9a0532ee 100644 --- a/tests/check_tests.py +++ b/tests/check_tests.py @@ -24,7 +24,7 @@ class TestCheckCommand(unittest.TestCase): def test_check_command_single(self): """Validate json conversion for a single project.""" - wf = OBSLocal.StagingWorkflow() + wf = OBSLocal.FactoryWorkflow() wf.create_staging('H') self.checkcommand = CheckCommand(wf.api) diff --git a/tests/comment_tests.py b/tests/comment_tests.py index f5781f44..36eb189a 100644 --- a/tests/comment_tests.py +++ b/tests/comment_tests.py @@ -93,7 +93,7 @@ handle class TestCommentOBS(OBSLocal.TestCase): def setUp(self): super(TestCommentOBS, self).setUp() - self.wf = OBSLocal.StagingWorkflow() + self.wf = OBSLocal.FactoryWorkflow() self.wf.create_user('factory-auto') self.wf.create_user('repo-checker') self.wf.create_user('staging-bot') diff --git a/tests/config_tests.py b/tests/config_tests.py index cc2053c3..8eaa7107 100644 --- a/tests/config_tests.py +++ b/tests/config_tests.py @@ -9,7 +9,7 @@ from . import OBSLocal class TestConfig(unittest.TestCase): def setup_vcr(self): - return OBSLocal.StagingWorkflow() + return OBSLocal.FactoryWorkflow() def test_basic(self): wf = self.setup_vcr() diff --git a/tests/devel_project_tests.py b/tests/devel_project_tests.py index ffa061dc..5d55dfde 100644 --- a/tests/devel_project_tests.py +++ b/tests/devel_project_tests.py @@ -7,7 +7,7 @@ class TestDevelProject(OBSLocal.TestCase): def setUp(self): super().setUp() - self.wf = OBSLocal.StagingWorkflow() + self.wf = OBSLocal.FactoryWorkflow() spa = self.wf.create_project('server:php:applications') OBSLocal.Package('drush', project=spa) OBSLocal.Package('drush', self.wf.projects['target'], devel_project='server:php:applications') diff --git a/tests/factory_submit_request_test.py b/tests/factory_submit_request_test.py index b85997db..72dc1f64 100644 --- a/tests/factory_submit_request_test.py +++ b/tests/factory_submit_request_test.py @@ -41,8 +41,8 @@ class TestFactorySubmitRequest(OBSLocal.TestCase): super(TestFactorySubmitRequest, self).setUp() # Setup the basic scenario, with manual reviewers, staging projects, rings and wine as - # example package (wine is in ring1, see OBSLocal.StagingWorkflow.setup_rings) - self.wf = OBSLocal.StagingWorkflow(PROJECT) + # example package (wine is in ring1, see OBSLocal.FactoryWorkflow.setup_rings) + self.wf = OBSLocal.FactoryWorkflow(PROJECT) self.__setup_review_team() self.__setup_devel_package('wine') self.wf.setup_rings(devel_project=DEVEL_PROJECT) diff --git a/tests/freeze_tests.py b/tests/freeze_tests.py index 36adc68f..4bee8383 100644 --- a/tests/freeze_tests.py +++ b/tests/freeze_tests.py @@ -24,7 +24,7 @@ class TestFreeze(OBSLocal.TestCase): return os.path.join(os.getcwd(), 'tests/fixtures') def test_bootstrap_copy(self): - wf = OBSLocal.StagingWorkflow() + wf = OBSLocal.FactoryWorkflow() fc = FreezeCommand(wf.api) diff --git a/tests/obslock_tests.py b/tests/obslock_tests.py index caaade61..7af26312 100644 --- a/tests/obslock_tests.py +++ b/tests/obslock_tests.py @@ -119,7 +119,7 @@ class TestOBSLock(unittest.TestCase): self.assertEqual(reason_sub, None, 'does not inherit hold') def setup_vcr(self): - wf = OBSLocal.StagingWorkflow() + wf = OBSLocal.FactoryWorkflow() wf.create_target() # we should most likely create this as part of create_target, but # it just slows down all other tests diff --git a/tests/origin_tests.py b/tests/origin_tests.py index 3099ee2a..71dd9735 100644 --- a/tests/origin_tests.py +++ b/tests/origin_tests.py @@ -28,7 +28,7 @@ class TestOrigin(OBSLocal.TestCase): super().setUp() self.target_project = self.randomString('target') - self.wf = OBSLocal.StagingWorkflow(self.target_project) + self.wf = OBSLocal.FactoryWorkflow(self.target_project) self.wf.create_attribute_type('OSRT', 'OriginConfig', 1) diff --git a/tests/repository_tests.py b/tests/repository_tests.py index 190c9ff9..bfd4c7d7 100644 --- a/tests/repository_tests.py +++ b/tests/repository_tests.py @@ -11,7 +11,7 @@ class TestRepository(unittest.TestCase): def setUp(self): super(TestRepository, self).setUp() - self.wf = OBSLocal.StagingWorkflow() + self.wf = OBSLocal.FactoryWorkflow() def tearDown(self): del self.wf diff --git a/tests/select_tests.py b/tests/select_tests.py index badbe544..4fd48162 100644 --- a/tests/select_tests.py +++ b/tests/select_tests.py @@ -25,7 +25,7 @@ class TestSelect(OBSLocal.TestCase): def setUp(self): super().setUp() super(TestSelect, self).setUp() - self.wf = OBSLocal.StagingWorkflow() + self.wf = OBSLocal.FactoryWorkflow() def tearDown(self): super(TestSelect, self).tearDown() diff --git a/tests/unselect_tests.py b/tests/unselect_tests.py index 8ee0dc10..979d7197 100644 --- a/tests/unselect_tests.py +++ b/tests/unselect_tests.py @@ -7,7 +7,7 @@ from . import OBSLocal class TestUnselect(OBSLocal.TestCase): def test_cleanup_filter(self): - wf = OBSLocal.StagingWorkflow() + wf = OBSLocal.FactoryWorkflow() UnselectCommand.config_init(wf.api) UnselectCommand.cleanup_days = 1 obsolete = wf.api.project_status_requests('obsolete', UnselectCommand.filter_obsolete)