Module scratch build fixups per PR review feedback:

- Keep scratch module builds in the 'done' state.
- Make koji tagging for scratch modules unique so the same
  commit can be resubmitted.
- Use alternate prefix for scratch module build components so they can
  be identified later.
- Prevent scratch build components from being reused.
- Assorted code and comment cleanup.

Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
This commit is contained in:
Merlin Mathesius
2019-03-01 10:22:37 -06:00
parent 6daa4d3776
commit 152419f376
13 changed files with 82 additions and 52 deletions

View File

@@ -336,6 +336,21 @@ class TestUtils:
release = module_build_service.utils.get_rpm_release(build_one)
assert release == 'module+f28+2+814cfa39'
def test_get_rpm_release_mse_scratch(self):
init_data(contexts=True, scratch=True)
build_one = models.ModuleBuild.query.get(2)
build_two = models.ModuleBuild.query.get(3)
release_one = module_build_service.utils.get_rpm_release(build_one)
release_two = module_build_service.utils.get_rpm_release(build_two)
assert release_one == "scrmod+2+b8645bbb"
assert release_two == "scrmod+2+17e35784"
def test_get_rpm_release_platform_stream_scratch(self):
scheduler_init_data(1, scratch=True)
build_one = models.ModuleBuild.query.get(2)
release = module_build_service.utils.get_rpm_release(build_one)
assert release == 'scrmod+f28+2+814cfa39'
@pytest.mark.parametrize('scmurl', [
('https://src.stg.fedoraproject.org/modules/testmodule.git'
'?#620ec77321b2ea7b0d67d82992dda3e1d67055b4'),