Skip to content

Commit

Permalink
SKip ansible-lint in pulp test matrix?
Browse files Browse the repository at this point in the history
No-Issue

Signed-off-by: James Tanner <[email protected]>
  • Loading branch information
jctanner committed Oct 13, 2023
1 parent 4a2c767 commit 6506065
Showing 1 changed file with 47 additions and 23 deletions.
70 changes: 47 additions & 23 deletions galaxy_ng/tests/unit/app/api/v1/test_tasks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import pytest

from unittest.mock import patch

from galaxy_importer.config import Config
from galaxy_ng.app.models import Namespace
from galaxy_ng.app.api.v1.models import LegacyNamespace
from galaxy_ng.app.api.v1.models import LegacyRole
Expand Down Expand Up @@ -29,11 +32,17 @@ def test_legacy_role_import_simple():
LegacyRole.objects.filter(namespace=legacy_ns, name=alternate_role_name).delete()

# import it
legacy_role_import(
github_user=github_user,
github_repo=github_repo,
alternate_role_name=alternate_role_name
)

with patch('galaxy_ng.app.api.v1.tasks.Config', spec=Config) as MockConfig:

MockConfig.return_value = Config()
MockConfig.return_value.run_ansible_lint = False

legacy_role_import(
github_user=github_user,
github_repo=github_repo,
alternate_role_name=alternate_role_name
)

# find the role
found = LegacyRole.objects.filter(namespace=legacy_ns, name=alternate_role_name)
Expand Down Expand Up @@ -84,12 +93,17 @@ def test_legacy_role_import_altered_github_org_name():
this_role.save()

# import it
legacy_role_import(
github_user=github_user,
github_repo=github_repo,
github_reference=github_reference,
alternate_role_name=alternate_role_name,
)
with patch('galaxy_ng.app.api.v1.tasks.Config', spec=Config) as MockConfig:

MockConfig.return_value = Config()
MockConfig.return_value.run_ansible_lint = False

legacy_role_import(
github_user=github_user,
github_repo=github_repo,
github_reference=github_reference,
alternate_role_name=alternate_role_name,
)

# find the role
found = LegacyRole.objects.filter(
Expand Down Expand Up @@ -138,12 +152,17 @@ def test_legacy_role_import_with_tag_name():
).delete()

# import it
legacy_role_import(
github_user=github_user,
github_repo=github_repo,
github_reference=github_reference,
alternate_role_name=alternate_role_name,
)
with patch('galaxy_ng.app.api.v1.tasks.Config', spec=Config) as MockConfig:

MockConfig.return_value = Config()
MockConfig.return_value.run_ansible_lint = False

legacy_role_import(
github_user=github_user,
github_repo=github_repo,
github_reference=github_reference,
alternate_role_name=alternate_role_name,
)

# find the role
found = LegacyRole.objects.filter(
Expand All @@ -160,12 +179,17 @@ def test_legacy_role_import_with_tag_name():

# import again with new ref
github_reference_2 = '1.24.3'
legacy_role_import(
github_user=github_user,
github_repo=github_repo,
github_reference=github_reference_2,
alternate_role_name=alternate_role_name,
)
with patch('galaxy_ng.app.api.v1.tasks.Config', spec=Config) as MockConfig:

MockConfig.return_value = Config()
MockConfig.return_value.run_ansible_lint = False

legacy_role_import(
github_user=github_user,
github_repo=github_repo,
github_reference=github_reference_2,
alternate_role_name=alternate_role_name,
)

# find the role
found = LegacyRole.objects.filter(
Expand Down

0 comments on commit 6506065

Please sign in to comment.