2019-04-30 11:44:37 +02:00
|
|
|
from . import OBSLocal
|
2017-10-19 00:23:17 -05:00
|
|
|
|
2022-02-18 17:15:48 +01:00
|
|
|
|
2019-05-02 08:14:44 +02:00
|
|
|
class TestDevelProject(OBSLocal.TestCase):
|
2017-10-19 00:23:17 -05:00
|
|
|
script = './devel-project.py'
|
|
|
|
script_debug_osc = False
|
|
|
|
|
2019-05-02 18:10:43 +02:00
|
|
|
def setUp(self):
|
2019-11-01 14:38:32 -05:00
|
|
|
super().setUp()
|
2021-08-25 12:13:56 +02:00
|
|
|
self.wf = OBSLocal.FactoryWorkflow()
|
2019-05-02 18:10:43 +02:00
|
|
|
spa = self.wf.create_project('server:php:applications')
|
2019-05-04 16:11:51 +02:00
|
|
|
OBSLocal.Package('drush', project=spa)
|
|
|
|
OBSLocal.Package('drush', self.wf.projects['target'], devel_project='server:php:applications')
|
2019-05-02 18:10:43 +02:00
|
|
|
staging = self.wf.create_project('openSUSE:Factory:Staging', maintainer={'users': ['staging-bot']})
|
2019-05-04 16:11:51 +02:00
|
|
|
OBSLocal.Package('dashboard', project=staging)
|
2019-05-02 18:10:43 +02:00
|
|
|
self.wf.api.pseudometa_file_ensure('devel_projects', 'server:php:applications')
|
|
|
|
|
|
|
|
def tearDown(self):
|
2019-11-01 14:38:32 -05:00
|
|
|
super().tearDown()
|
2019-05-02 18:10:43 +02:00
|
|
|
self.osc_user('Admin')
|
|
|
|
del self.wf
|
|
|
|
|
2017-10-19 00:23:17 -05:00
|
|
|
def test_list(self):
|
|
|
|
self.osc_user('staging-bot')
|
2017-10-24 18:04:30 -05:00
|
|
|
self.execute_script(['list', '--write'])
|
2017-10-19 00:23:17 -05:00
|
|
|
self.assertOutput('server:php:applications')
|
|
|
|
# TODO Assert --write worked and in file.
|
|
|
|
|
|
|
|
def test_reviews(self):
|
|
|
|
self.osc_user('staging-bot')
|
2017-10-24 18:04:30 -05:00
|
|
|
self.execute_script(['reviews'])
|
2017-10-19 00:23:17 -05:00
|
|
|
|
|
|
|
def test_requests(self):
|
|
|
|
self.osc_user('staging-bot')
|
2017-10-24 18:04:30 -05:00
|
|
|
self.execute_script(['requests'])
|