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

Test against Ansible versions 7 and 8 #195

Merged
merged 2 commits into from
Sep 18, 2023
Merged

Conversation

john-odonnell
Copy link
Contributor

Desired Outcome

We need to test the Collection against at least two supported versions of ansible-core. With ansible-core 2.13 approaching EOL, we should test against 2.14 and 2.15.

Unit and sanity tests are currently run against 2.13 through 2.15, but we should extend this to our end-to-end tests as well.

Implemented Changes

  • Add Jenkins stages to run end-to-end tests against Ansible 6 (stable-2.13), 7 (stable-2.14) and 8 (stable-2.15)

  • Consolidate dev and test environments.

    Previously there were three separate docker-compose environments for development, testing the conjur_variable plugin, and testing the conjur_host_identity role. All three environments were almost exact replicas of each other, so I decided to consolidate them into the dev env.

    Interesting notes:

    • We might be doing some unconventional things with the project-native docker-compose environments and the one provided by conjurdemos/conjur-intro to enable running tests against Conjurs Open Source and Enterprise. When tests are run against Enterprise, these scripts are still using separate compose environments, but connecting them on the same network.

      To prevent context-switching between docker-compose environments, the dev env writes the in-use Docker network a number of CIDs to tmp files and uses those to run common docker exec commands.

    • The conjur_variable and conjur_host_identity test suites are distinct, and can be run against the same docker-compose environment without interfering with each other. Now we can parallelize all tests without doubling setup/teardown time and required resources.

Connected Issue/Story

N/A

Definition of Done

At least 1 todo must be completed in the sections below for the PR to be
merged.

Changelog

  • The CHANGELOG has been updated, or
  • This PR does not include user-facing changes and doesn't require a
    CHANGELOG update

Test coverage

  • This PR includes new unit and integration tests to go with the code
    changes, or
  • The changes in this PR do not require tests

Documentation

  • Docs (e.g. READMEs) were updated in this PR
  • A follow-up issue to update official docs has been filed here: [insert issue ID]
  • This PR does not require updating any documentation

Behavior

  • This PR changes product behavior and has been reviewed by a PO, or
  • These changes are part of a larger initiative that will be reviewed later, or
  • No behavior was changed with this PR

Security

  • Security architect has reviewed the changes in this PR,
  • These changes are part of a larger initiative with a separate security review, or
  • There are no security aspects to these changes

@john-odonnell john-odonnell force-pushed the test-additional-versions branch 2 times, most recently from d4f7bef to 14fc7b0 Compare September 15, 2023 21:06
@john-odonnell john-odonnell marked this pull request as ready for review September 15, 2023 21:41
@john-odonnell john-odonnell requested a review from a team as a code owner September 15, 2023 21:41
Copy link
Contributor

@szh szh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@john-odonnell john-odonnell merged commit 732dd22 into main Sep 18, 2023
38 of 40 checks passed
@john-odonnell john-odonnell deleted the test-additional-versions branch September 18, 2023 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants