charmed-kubernetes / pytest-operator

Apache License 2.0
7 stars 13 forks source link

fix: adjust OpsTest.tmp_path to avoid os.sep #125

Open tonyandrewmeyer opened 9 months ago

tonyandrewmeyer commented 9 months ago

When generating the tmp_path, ensure that only characters from the model name that are safe for use in paths are used. This particularly covers the case where the model name is in the form user/name, like MAAS.

Fixes #123

tonyandrewmeyer commented 9 months ago

Are there docs somewhere on how to run the tests (locally, not relying on CI)? tox -e lint and tox -e unit both pass locally, using Python 3.11, but fail in the CI, so I must not be running them correctly. tox -e integration fails locally, but with a totally different error to in the CI: RuntimeError: Missing dependency: charm.

addyess commented 8 months ago

Are there docs somewhere on how to run the tests (locally, not relying on CI)? tox -e lint and tox -e unit both pass locally, using Python 3.11, but fail in the CI, so I must not be running them correctly. tox -e integration fails locally, but with a totally different error to in the CI: RuntimeError: Missing dependency: charm.

if you rebase, you'll see the integration tests are likely going to work after merging https://github.com/charmed-kubernetes/pytest-operator/pull/128

dimaqq commented 1 month ago

@tonyandrewmeyer poke if still relevant