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

tox: pass PYCLOUDLIB_* env vars into integration tests when present #1196

Merged
merged 1 commit into from
Jan 18, 2022

Conversation

blackboxsw
Copy link
Collaborator

@blackboxsw blackboxsw commented Jan 18, 2022

Proposed Commit Message

tox: pass PYCLOUDLIB_* env vars into integration tests when present

Allow any PYCLOUDLIB_* environment variables in integration-tests and jenkins
environments to allow overriding default behavior.

This specifically helps jenkins which seeds PYCLOUDLIB_CONFIG env var for
secrets.

Additional Context

Test Steps

# running the tox command before you create this file will result in errors like:
#   >       raise ValueError(
            "No configuration file found! Copy pycloudlib.toml.template to "
            "~/.config/pycloudlib.toml or /etc/pycloudlib.toml"
        )


cat > /tmp/test.toml <<EOF
[lxd]
EOF

CLOUD_INIT_PLATFORM=lxd_vm CLOUD_INIT_OS_IMAGE=jammy CLOUD_INIT_CLOUD_INIT_SOURCE=ppa:cloud-init-dev/daily CLOUD_INIT_COLLECT_LOGS=ON_ERROR PYCLOUDLIB_CONFIG=/tmp/test.toml  tox -e  integration-tests tests/integration_tests/modules/test_cli.py

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

@blackboxsw
Copy link
Collaborator Author

related jenkins build failure showing that PYCLOUDLIB_CONFIG env var isn't being honored/seen https://jenkins.ubuntu.com/server/view/cloud-init/job/cloud-init-integration-lxd_vm-jammy-daily/12/consoleFull

Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

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

Thanks!

@TheRealFalcon TheRealFalcon merged commit c2c2a66 into canonical:main Jan 18, 2022
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.

2 participants