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

Option --test-directory is not used for overlays #475

Open
rgildein opened this issue Jan 13, 2022 · 1 comment
Open

Option --test-directory is not used for overlays #475

rgildein opened this issue Jan 13, 2022 · 1 comment

Comments

@rgildein
Copy link
Contributor

Using the --test-directory option does not work for overlays, as they are searched in a folder defined only by constants.

An example of how I wanted to use it.

$ tree tests/functional 
tests/functional
├── bundles
│   ├── openstack.yaml
│   └── overlays
│       └── openstack.yaml.j2
├── requirements.txt
└── tests.yaml
# tox.ini
commands =
    functest-run-suite --test-directory {toxinidir}/tests/functional --bundle openstack --keep-model {posargs}

Such a run of functional tests does not take into account the openstack.yaml.j2 overlay.

@ajkavanagh
Copy link
Collaborator

It's a little bit complicated, but this is indeed a missing feature. The reason is largely because render_overlay(...) calls get_template(...), but doesn't pass a template_dir.

This also happens in render_local_overlay(...) - again a template_dir is not passed and the default constant is used.

However, in deploy_bundle(...) the right thing is done.

Essentially, to fix this, the template_dir parameter needs to be set in the call to get_template() everywhere it is called.

rgildein added a commit to rgildein/juju-verify that referenced this issue Jan 24, 2022
This is due to the bug [1] that indicates that overlays can only be used if
they are placed in ./tests/overlays subdirectory.

---
[1]: openstack-charmers/zaza#475
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants