Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add component tests for collection #41

Merged
merged 60 commits into from
Oct 31, 2024

Conversation

WStechura
Copy link
Contributor

@WStechura WStechura commented Jul 23, 2024

Add integration tests, used in previous collection. Most of the changes is just a copy-paste of an old test framework, however some adoption was required.
The rests are being run by run.py script within tests/integration folder. Upon detection localhost as one of the platforms parametrers, deployment on local machine is performed. Unfortunately, it does not work for Windows platforms as Ansible does work with this platform as main node.
The tests uses artifical installer, residing in tests/integration/installers directory, which is combined with uninstall.sh and oneagentctl scripts to perform seamless deployment.
Test directory resides in tests/integration/tests_dir which is removed after test is performed

@WStechura WStechura self-assigned this Jul 23, 2024
@WStechura WStechura force-pushed the add-intergration-tests-for-collection branch 2 times, most recently from 912bfe5 to f6fb43e Compare July 26, 2024 11:12
@WStechura
Copy link
Contributor Author

Make sure the pylint, ansible-lint and shellcheck are passing

.github/actions/setup-build-environment/action.yaml Outdated Show resolved Hide resolved
.github/actions/run-tests/action.yaml Outdated Show resolved Hide resolved
.idea/inspectionProfiles/Project_Default.xml Outdated Show resolved Hide resolved
roles/oneagent/README.md Outdated Show resolved Hide resolved
roles/oneagent/defaults/main.yml Show resolved Hide resolved
roles/oneagent/tests/integration/run.py Outdated Show resolved Hide resolved
roles/oneagent/tests/integration/scripts/server/server.py Outdated Show resolved Hide resolved
@jakubrak
Copy link
Contributor

Tests are failing with

Run pip install venv ansible
  pip install venv ansible
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    FILES_DIR: roles/oneagent/files
    pythonLocation: /opt/hostedtoolcache/Python/3.10.14/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.14/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.14/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.14/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.14/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.14/x64/lib
ERROR: Could not find a version that satisfies the requirement venv (from versions: none)
ERROR: No matching distribution found for venv
Error: Process completed with exit code 1.

@WStechura
Copy link
Contributor Author

WStechura commented Jul 30, 2024

Rename integration to internal and exclude tests being embedded in build collection

@WStechura WStechura changed the title Add intergration tests for collection Add component tests for collection Jul 30, 2024
roles/oneagent/tests/conmponent/README.md Outdated Show resolved Hide resolved
roles/oneagent/tests/conmponent/README.md Outdated Show resolved Hide resolved
roles/oneagent/tests/conmponent/README.md Outdated Show resolved Hide resolved
roles/oneagent/tests/conmponent/scripts/tests/conftest.py Outdated Show resolved Hide resolved
roles/oneagent/tests/conmponent/run.py Outdated Show resolved Hide resolved
roles/oneagent/tests/conmponent/run.py Outdated Show resolved Hide resolved
roles/oneagent/tests/conmponent/run.py Outdated Show resolved Hide resolved
roles/oneagent/tests/conmponent/run.py Outdated Show resolved Hide resolved
roles/oneagent/tests/conmponent/run.py Outdated Show resolved Hide resolved
roles/oneagent/tests/conmponent/run.py Outdated Show resolved Hide resolved
roles/oneagent/tests/conmponent/run.py Outdated Show resolved Hide resolved
roles/oneagent/tests/conmponent/run.py Outdated Show resolved Hide resolved
@WStechura WStechura force-pushed the add-intergration-tests-for-collection branch 9 times, most recently from 354f93f to 5d84db8 Compare September 13, 2024 06:00
@jakubrak jakubrak force-pushed the add-intergration-tests-for-collection branch from fef389d to 69f82dd Compare October 22, 2024 13:12
@jakubrak jakubrak force-pushed the add-intergration-tests-for-collection branch from 270aca1 to 74a34fd Compare October 22, 2024 13:56
@WStechura WStechura force-pushed the add-intergration-tests-for-collection branch 2 times, most recently from e24224b to a8b1516 Compare October 29, 2024 11:32
@WStechura WStechura merged commit 1b7e8ea into master Oct 31, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants