-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing review comments as well.
- Loading branch information
Showing
7 changed files
with
172 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"compose_id": "RHEL-7.0-20130203.7", | ||
"compose_date": "2013-02-03", | ||
"compose_type": "nightly", | ||
"compose_respin": 0, | ||
"release": "aifv-5802", | ||
"compose_label": "RC-3.0", | ||
"deleted": false, | ||
"rpm_mapping_template": "https://pdc-dt.app.qa.eng.nay.redhat.com/rest_api/v1/composes/RHEL-7.0-20130203.7/rpm-mapping/{{package}}/", | ||
"sigkeys": [ | ||
"fd431d51" | ||
], | ||
"acceptance_testing": "untested", | ||
"linked_releases": [ | ||
"sap-7.0-rhel-7" | ||
], | ||
"rtt_tested_architectures": { | ||
"Workstation": { | ||
"x86_64": "untested" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Compose ID RHEL-7.0-20130203.7 | ||
Compose Label RC-3.0 | ||
Compose Date 2013-02-03 | ||
Compose Respin 0 | ||
Compose Type nightly | ||
Acceptance Testing untested | ||
Deleted False | ||
Release aifv-5802 | ||
Rpm Mapping Template https://pdc-dt.app.qa.eng.nay.redhat.com/rest_api/v1/composes/RHEL-7.0-20130203.7/rpm-mapping/{{package}}/ | ||
|
||
Linked Releases | ||
Release sap-7.0-rhel-7 | ||
|
||
Sigkeys | ||
Sigkey fd431d51 | ||
|
||
Rtt Tested Architectures | ||
Variant Arches Testing Status | ||
Workstation x86_64 untested |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
RHEL-7.1-20150924.0 | ||
RHEL-7.1-20150924.1 | ||
RHEL-7.1-20150924.2 | ||
RHEL-7.1-20150924.3 | ||
RHEL-7.1-20150924.4 | ||
RHEL-7.1-20150924.5 | ||
RHEL-7.1-20150924.6 | ||
RHEL-7.1-20150924.7 | ||
RHEL-7.1-20150924.8 | ||
RHEL-7.1-20150924.9 | ||
RHEL-7.1-20150924.10 | ||
RHEL-7.1-20150924.11 | ||
RHEL-7.1-20150924.12 | ||
RHEL-7.1-20150924.13 | ||
RHEL-7.1-20150924.14 | ||
RHEL-7.1-20150924.15 | ||
RHEL-7.1-20150924.16 | ||
RHEL-7.1-20150924.17 | ||
RHEL-7.1-20150924.18 | ||
RHEL-7.1-20150924.19 | ||
RHEL-7.1-20150924.20 | ||
RHEL-7.1-20150924.21 | ||
RHEL-7.1-20150924.22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (c) 2015 Red Hat | ||
# Licensed under The MIT License (MIT) | ||
# http://opensource.org/licenses/MIT | ||
# | ||
from pdc_client.test_helpers import CLITestCase | ||
from pdc_client.runner import Runner | ||
|
||
|
||
class ComposeTestCase(CLITestCase): | ||
def setUp(self): | ||
self.runner = Runner() | ||
self.runner.setup() | ||
self.compose_detail = { | ||
"compose_id": "RHEL-7.0-20130203.7", | ||
"compose_date": "2013-02-03", | ||
"compose_type": "nightly", | ||
"compose_respin": 0, | ||
"release": "aifv-5802", | ||
"compose_label": "RC-3.0", | ||
"deleted": False, | ||
"rpm_mapping_template": "https://pdc-dt.app.qa.eng.nay.redhat.com/rest_api/v1/composes/RHEL-7.0-20130203.7/rpm-mapping/{{package}}/", | ||
"sigkeys": [ | ||
"fd431d51" | ||
], | ||
"acceptance_testing": "untested", | ||
"linked_releases": [ | ||
"sap-7.0-rhel-7" | ||
], | ||
"rtt_tested_architectures": { | ||
"Workstation": { | ||
"x86_64": "untested" | ||
} | ||
} | ||
} | ||
|
||
def test_list_multi_page(self, api): | ||
api.add_endpoint('composes', 'GET', [ | ||
{'compose_id': 'RHEL-7.1-20150924.{}'.format(x)} | ||
for x in range(23) | ||
]) | ||
with self.expect_output('list_multi_page.txt'): | ||
self.runner.run(['compose-list']) | ||
self.assertEqual(api.calls['composes'], | ||
[('GET', {'page': 1, 'deleted': False}), | ||
('GET', {'page': 2, 'deleted': False})]) | ||
|
||
def test_list_deleted(self, api): | ||
api.add_endpoint('composes', 'GET', []) | ||
with self.expect_output('empty.txt'): | ||
self.runner.run(['compose-list', '--deleted']) | ||
self.assertEqual(api.calls['composes'], | ||
[('GET', {'page': 1, 'deleted': True})]) | ||
|
||
def test_info(self, api): | ||
api.add_endpoint('composes/RHEL-7.0-20130203.7', 'GET', self.compose_detail) | ||
with self.expect_output('info.txt'): | ||
self.runner.run(['compose-info', 'RHEL-7.0-20130203.7']) | ||
self.assertDictEqual(api.calls, | ||
{'composes/RHEL-7.0-20130203.7': [('GET', {})]}) | ||
|
||
def test_info_json(self, api): | ||
api.add_endpoint('composes/RHEL-7.0-20130203.7', 'GET', self.compose_detail) | ||
with self.expect_output('info.json', parse_json=True): | ||
self.runner.run(['--json', 'compose-info', 'RHEL-7.0-20130203.7']) | ||
self.assertDictEqual(api.calls, | ||
{'composes/RHEL-7.0-20130203.7': [('GET', {})]}) | ||
|
||
def test_update(self, api): | ||
api.add_endpoint('composes/RHEL-7.0-20130203.7', 'GET', self.compose_detail) | ||
with self.expect_output('info.txt'): | ||
self.runner.run(['compose-update', 'RHEL-7.0-20130203.7', | ||
'--acceptance-testing', 'passed', | ||
'--linked-releases', 'sap-7.0-rhel-7.0', | ||
'--rtt-tested-architectures', 'Workstation:x86_64:passed' | ||
]) | ||
self.assertDictEqual(api.calls, {'composes/RHEL-7.0-20130203.7': | ||
[('PATCH', {'acceptance_testing': 'passed', | ||
'linked_releases': ['sap-7.0-rhel-7.0'], | ||
'rtt_tested_architectures': {'Workstation': {'x86_64': 'passed'}}}), | ||
('GET', {})]}) | ||
|
||
def test_update_wrong_input1(self, api): | ||
with self.expect_failure(): | ||
self.runner.run(['compose-update', 'RHEL-7.0-20130203.7', | ||
'--acceptance-testing', 'passed', | ||
'--linked-releases', 'sap-7.0-rhel-7.0', | ||
'--rtt-tested-architectures', 'Workstation:x86_64:passed:wronginput' | ||
]) | ||
|
||
def test_update_wrong_input2(self, api): | ||
with self.expect_failure(): | ||
self.runner.run(['compose-update', 'RHEL-7.0-20130203.7', | ||
'--acceptance-testing', 'wronginput', | ||
'--linked-releases', 'sap-7.0-rhel-7.0', | ||
'--rtt-tested-architectures', 'Workstation:x86_64:passed' | ||
]) |