Make 'SkipContents' configurable in API. #345

Also add global configuration to disable 'skipContents' by
default for all new published repos/snapshots.
This commit is contained in:
Andrey Smirnov
2016-02-11 13:24:43 +03:00
parent 0339f0fe23
commit f50e008763
10 changed files with 31 additions and 2 deletions
+7
View File
@@ -41,6 +41,7 @@ class PublishAPITestRepo(APITest):
'Label': '',
'Origin': '',
'Prefix': prefix,
'SkipContents': False,
'SourceKind': 'local',
'Sources': [{'Component': 'main', 'Name': repo_name}],
'Storage': ''}
@@ -74,6 +75,7 @@ class PublishAPITestRepo(APITest):
'Label': '',
'Origin': '',
'Prefix': ".",
'SkipContents': False,
'SourceKind': 'local',
'Sources': [{'Component': 'main', 'Name': repo_name}],
'Storage': ''}
@@ -129,6 +131,7 @@ class PublishSnapshotAPITest(APITest):
'Label': '',
'Origin': '',
'Prefix': prefix,
'SkipContents': False,
'SourceKind': 'snapshot',
'Sources': [{'Component': 'main', 'Name': snapshot_name}],
'Storage': ''})
@@ -188,6 +191,7 @@ class PublishUpdateAPITestRepo(APITest):
'Label': '',
'Origin': '',
'Prefix': prefix,
'SkipContents': False,
'SourceKind': 'local',
'Sources': [{'Component': 'main', 'Name': repo_name}],
'Storage': ''}
@@ -238,6 +242,7 @@ class PublishSwitchAPITestRepo(APITest):
'Label': '',
'Origin': '',
'Prefix': prefix,
'SkipContents': False,
'SourceKind': 'snapshot',
'Sources': [{'Component': 'main', 'Name': snapshot1_name}],
'Storage': ''}
@@ -261,6 +266,7 @@ class PublishSwitchAPITestRepo(APITest):
json={
"Snapshots": [{"Component": "main", "Name": snapshot2_name}],
"Signing": DefaultSigningOptions,
"SkipContents": True,
})
repo_expected = {
'Architectures': ['i386', 'source'],
@@ -268,6 +274,7 @@ class PublishSwitchAPITestRepo(APITest):
'Label': '',
'Origin': '',
'Prefix': prefix,
'SkipContents': True,
'SourceKind': 'snapshot',
'Sources': [{'Component': 'main', 'Name': snapshot2_name}],
'Storage': ''}