Skip to content

Commit cc59441

Browse files
authored
Set galaxy to old-galaxy for community tools and tests. (#1911)
No-Issue --------- Signed-off-by: James Tanner <tanner.jc@gmail.com>
1 parent cecf61a commit cc59441

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

galaxy_ng/app/api/v1/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ class LegacySyncSerializer(serializers.Serializer):
399399

400400
baseurl = serializers.CharField(
401401
required=False,
402-
default='https://galaxy.ansible.com/api/v1/roles/'
402+
default='https://old-galaxy.ansible.com/api/v1/roles/'
403403
)
404404
github_user = serializers.CharField(required=False)
405405
role_name = serializers.CharField(required=False)

galaxy_ng/app/management/commands/sync-collection-download-counts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
log = logging.getLogger(__name__)
1414

1515

16-
DEFAULT_UPSTREAM = 'https://galaxy.ansible.com'
16+
DEFAULT_UPSTREAM = 'https://old-galaxy.ansible.com'
1717

1818
SKIPLIST = [
1919
'larrymou9',

galaxy_ng/app/utils/galaxy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def find_namespace(baseurl=None, name=None, id=None):
8282

8383
logger.info(f'baseurl1: {baseurl}')
8484
if baseurl is None or not baseurl:
85-
baseurl = 'https://galaxy.ansible.com'
85+
baseurl = 'https://old-galaxy.ansible.com'
8686
baseurl += '/api/v1/namespaces'
8787
logger.info(f'baseurl2: {baseurl}')
8888

@@ -151,7 +151,7 @@ def upstream_namespace_iterator(
151151
"""Abstracts the pagination of v2 collections into a generator with error handling."""
152152
logger.info(f'baseurl1: {baseurl}')
153153
if baseurl is None or not baseurl:
154-
baseurl = 'https://galaxy.ansible.com/api/v1/namespaces'
154+
baseurl = 'https://old-galaxy.ansible.com/api/v1/namespaces'
155155
if not baseurl.rstrip().endswith('/api/v1/namespaces'):
156156
baseurl = baseurl.rstrip() + '/api/v1/namespaces'
157157
logger.info(f'baseurl2: {baseurl}')
@@ -228,7 +228,7 @@ def upstream_collection_iterator(
228228
"""Abstracts the pagination of v2 collections into a generator with error handling."""
229229
logger.info(f'baseurl1: {baseurl}')
230230
if baseurl is None or not baseurl:
231-
baseurl = 'https://galaxy.ansible.com/api/v2/collections'
231+
baseurl = 'https://old-galaxy.ansible.com/api/v2/collections'
232232
logger.info(f'baseurl2: {baseurl}')
233233

234234
# normalize the upstream url
@@ -411,7 +411,7 @@ def upstream_role_iterator(
411411
"""Abstracts the pagination of v1 roles into a generator with error handling."""
412412
logger.info(f'baseurl1: {baseurl}')
413413
if baseurl is None or not baseurl:
414-
baseurl = 'https://galaxy.ansible.com/api/v1/roles'
414+
baseurl = 'https://old-galaxy.ansible.com/api/v1/roles'
415415
logger.info(f'baseurl2: {baseurl}')
416416

417417
# normalize the upstream url

galaxy_ng/tests/integration/cli/test_community_sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_community_collection_download_count_sync(ansible_config):
2525

2626
# pick an upstream collection at random that does not exist locally ...
2727
sync_collection = None
28-
base_url = 'https://galaxy.ansible.com'
28+
base_url = 'https://old-galaxy.ansible.com'
2929
next_url = base_url + '/api/v2/collections/'
3030
while next_url:
3131
rr = requests.get(next_url)

galaxy_ng/tests/integration/community/test_community_namespace_rbac.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,3 +474,9 @@ def test_social_user_sync_with_changed_login(ansible_config):
474474
@pytest.mark.deployment_community
475475
def test_rbac_utils_get_owned_v3_namespaces(ansible_config):
476476
pass
477+
478+
479+
@pytest.mark.skip(reason='this should be unit tested')
480+
@pytest.mark.deployment_community
481+
def test_community_tools_urls(ansible_config):
482+
pass

0 commit comments

Comments
 (0)