Skip to content

Commit

Permalink
reenable all tests
Browse files Browse the repository at this point in the history
test on container test

run all tests

debug podman

fix typo

debug podman

settings

debug more

debug more2

debug more3

debug more4

change DJANGO_SUPERUSER creds

retest

retest

retest2

retest3

retest4

retest5

retest6

reset to default
  • Loading branch information
jerabekjiri committed Dec 6, 2024
1 parent b2e18e5 commit 9018458
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 57 deletions.
28 changes: 9 additions & 19 deletions .github/workflows/ci-docker-compose-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
pull_request:
branches:
- '**'
# push:
# branches:
# - '**'
push:
branches:
- '**'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -49,14 +49,6 @@ jobs:
run: |
sudo apt-get install -y libsasl2-dev python-dev-is-python3 libldap2-dev libssl-dev podman
# - name: verify podman
# run: |
# podman --version

# - run: podman --help
#
# - run: podman pull alpine

- name: Spin up dev/compose/${{ matrix.env.TEST_PROFILE }}.yaml
run: |
docker compose -f dev/compose/${{ matrix.env.TEST_PROFILE }}.yaml up --detach
Expand All @@ -81,12 +73,10 @@ jobs:
fi
done
- run: podman login localhost:5001 -u admin -p admin --tls-verify=False
- name: Install integration requirements
run: |
pip install -r integration_requirements.txt
# - name: Install integration requirements
# run: |
# pip install -r integration_requirements.txt
#
# - name: Run integration tests
# run: |
# pytest -v -r sx --color=yes -m '${{ env.HUB_TEST_MARKS }}' galaxy_ng/tests/integration
- name: Run integration tests
run: |
pytest -v -r sx --color=yes -m '${{ env.HUB_TEST_MARKS }}' galaxy_ng/tests/integration
20 changes: 10 additions & 10 deletions .github/workflows/ci_automation_hub_collection.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
name: Galaxy Collection CI
on:
# pull_request:
# branches:
# - "*"
# paths-ignore:
# - "CHANGES/**"
# - "docs/**"
# - "mkdocs.yml"
# push:
# branches:
# - "*"
pull_request:
branches:
- "*"
paths-ignore:
- "CHANGES/**"
- "docs/**"
- "mkdocs.yml"
push:
branches:
- "*"
workflow_dispatch:

jobs:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci_full.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
name: galaxy_ng/ci
on:
workflow_dispatch:
# - push
# - pull_request
- push
- pull_request

jobs:

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci_oci-env-integration.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: OCI Env Integration
on:
# pull_request:
# branches:
# - '**'
# push:
# branches:
# - '**'
pull_request:
branches:
- '**'
push:
branches:
- '**'
workflow_dispatch:

jobs:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sonar-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
name: SonarCloud
on:
workflow_run:
# workflows:
# - galaxy_ng/ci
# types:
# - completed
workflows:
- galaxy_ng/ci
types:
- completed
jobs:
sonar:
name: Upload to SonarCloud
Expand Down
5 changes: 3 additions & 2 deletions dev/compose/standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ x-common-env: &common-env
PULP_ANSIBLE_API_HOSTNAME: 'http://localhost:5001'
PULP_ANSIBLE_CONTENT_HOSTNAME: "http://localhost:5001"
PULP_CONTENT_ORIGIN: "http://localhost:5001"
PULP_CSRF_TRUSTED_ORIGINS: "['https://localhost']"
PULP_CSRF_TRUSTED_ORIGINS: "['http://localhost']"

# signing ...
PULP_GALAXY_AUTO_SIGN_COLLECTIONS: 'false'
Expand Down Expand Up @@ -73,6 +73,7 @@ x-common-env: &common-env
HUB_API_ROOT: 'http://localhost:5001/api/galaxy/'
HUB_TEST_MARKS: deployment_standalone or all
HUB_USE_MOVE_ENDPOINT: 'true'
CONTAINER_REGISTRY: 'localhost:5001'

# Unpin dependencies on setup.py if set to 0
LOCK_REQUIREMENTS: 0
Expand All @@ -82,7 +83,7 @@ x-common-env: &common-env
# "dynaconf:pulpcore:galaxy_importer:pulp_ansible:pulp_container:galaxy_ng:django-ansible-base"
# This can be done as part of the `docker compose` call:
# $ DEV_SOURCE_PATH="pulp_container:galaxy_ng" docker compose -f dev/compose/standalone.yaml up
DEV_SOURCE_PATH: 'galaxy_ng'
DEV_SOURCE_PATH:

# allow attaching to the running container
x-debugging: &debugging
Expand Down
10 changes: 4 additions & 6 deletions galaxy_ng/tests/integration/api/test_container_push_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,19 @@ def test_gw_can_update_container_push(ansible_config, galaxy_client):
def test_can_update_container_push(ansible_config, require_auth):
config = ansible_config("admin")
container_engine = config["container_engine"]
url = config['url']
parsed_url = urlparse(url)
cont_reg = parsed_url.netloc
container_registry = config["container_registry"]
# Pull alpine image
pull_and_tag_test_image(container_engine, cont_reg)
pull_and_tag_test_image(container_engine, container_registry)

# Login to local registry with tls verify disabled
cmd = [container_engine, "login", "-u", f"{config['username']}", "-p",
f"{config['password']}", f"{config['url'].split(parsed_url.path)[0]}"]
f"{config['password']}", container_registry]
if container_engine == "podman":
cmd.append("--tls-verify=false")
subprocess.check_call(cmd)

# Push image to local registry
cmd = [container_engine, "push", f"{cont_reg}/alpine:latest"]
cmd = [container_engine, "push", f"{container_registry}/alpine:latest"]
if container_engine == "podman":
cmd.append("--tls-verify=false")
subprocess.check_call(cmd)
Expand Down
11 changes: 4 additions & 7 deletions galaxy_ng/tests/integration/api/test_container_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,21 @@ def test_push_and_sign_a_container(ansible_config, flags, require_auth, galaxy_c
pytest.skip("GALAXY_CONTAINER_SIGNING_SERVICE is not configured")

config = ansible_config("admin")
url = config['url']
parsed_url = urlparse(url)
cont_reg = parsed_url.netloc

container_engine = config["container_engine"]
container_registry = config["container_registry"]

# Pull alpine image
pull_and_tag_test_image(container_engine, cont_reg)
pull_and_tag_test_image(container_engine, container_registry)

# Login to local registry with tls verify disabled
cmd = [container_engine, "login", "-u", f"{config['username']}", "-p",
f"{config['password']}", f"{config['url'].split(parsed_url.path)[0]}"]
f"{config['password']}", container_registry]
if container_engine == 'podman':
cmd.append("--tls-verify=false")
subprocess.check_call(cmd)

# Push image to local registry
cmd = [container_engine, "push", f"{cont_reg}/alpine:latest"]
cmd = [container_engine, "push", f"{container_registry}/alpine:latest"]
if container_engine == 'podman':
cmd.append("--tls-verify=false")
subprocess.check_call(cmd)
Expand Down

0 comments on commit 9018458

Please sign in to comment.