Skip to content

Commit

Permalink
pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
MozeBaltyk committed May 17, 2024
1 parent 040a504 commit 7c5a729
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/stage_airgap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,15 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install ansible pytest-testinfra
python3 -m pip install --upgrade pip
python3 -m pip install -U pytest-testinfra ansible pytest-sugar pytest
ansible --version
- name: Run Python Tests
run: |
export DEFAULT_PRIVATE_KEY_FILE=.key
pytest --hosts=RKE2_CONTROLLERS --ansible-inventory=inventory/hosts.ini --force-ansible --connection=ansible --user=root basic_server_tests.py
pytest --hosts=RKE2_WORKERS --ansible-inventory=inventory/hosts.ini --force-ansible --connection=ansible --user=root basic_agent_tests.py
python3 -m pytest --hosts=RKE2_CONTROLLERS --ansible-inventory=inventory/hosts.ini --force-ansible --connection=ansible basic_server_tests.py
python3 -m pytest --hosts=RKE2_WORKERS --ansible-inventory=inventory/hosts.ini --force-ansible --connection=ansible basic_agent_tests.py
delay:
name: Delay
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/stage_online.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,6 @@ jobs:
# run: |
# ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -u root --private-key .key playbooks/neuvector.yml

#- name: Run Python Tests
# run: |
# export DEFAULT_PRIVATE_KEY_FILE=.key
# pytest --hosts=rke2_servers --ansible-inventory=hosts.ini --force-ansible --connection=ansible --sudo test/basic_server_tests.py
# pytest --hosts=rke2_agents --ansible-inventory=hosts.ini --force-ansible --connection=ansible --sudo test/basic_agent_tests.py

test:
name: Test
runs-on: ubuntu-latest
Expand Down Expand Up @@ -248,15 +242,15 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install ansible pytest-testinfra
python3 -m pip install --upgrade pip
python3 -m pip install -U pytest-testinfra ansible pytest-sugar pytest
ansible --version
- name: Run Python Tests
run: |
export DEFAULT_PRIVATE_KEY_FILE=.key
pytest --hosts=RKE2_CONTROLLERS --ansible-inventory=inventory/hosts.ini --force-ansible --connection=ansible --user=root basic_server_tests.py
pytest --hosts=RKE2_WORKERS --ansible-inventory=inventory/hosts.ini --force-ansible --connection=ansible --user=root basic_agent_tests.py
python3 -m pytest --hosts=RKE2_CONTROLLERS --ansible-inventory=inventory/hosts.ini --force-ansible --connection=ansible basic_server_tests.py
python3 -m pytest --hosts=RKE2_WORKERS --ansible-inventory=inventory/hosts.ini --force-ansible --connection=ansible basic_agent_tests.py
delay:
name: Delay
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ hosts.ini
.key
Chart.lock
.venv/
__pycache__
AWS
1 change: 1 addition & 0 deletions test/ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[defaults]
remote_user = root
inventory = ./inventory/hosts.ini
roles_path = ../roles
host_key_checking = False
Expand Down

0 comments on commit 7c5a729

Please sign in to comment.