Rename OBSLocal.StagingWorkflow to OBSLocal.FactoryWorkflow
This commit is contained in:
parent
d2e3c9d2c1
commit
28c771927a
@ -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.
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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'])
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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')
|
||||
|
@ -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()
|
||||
|
@ -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')
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user