Skip to content

Commit

Permalink
test: fix unit tests to not overwrite existing cli config file (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykim-akamai authored Sep 25, 2024
1 parent 4a3f37d commit e7efcea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ clean:
rm -rf dist linode_cli.egg-info build

.PHONY: testunit
testunit: export LINODE_CLI_TEST_MODE = 1
testunit:
pytest -v tests/unit
@mkdir -p /tmp/linode/.config
@orig_xdg_config_home=$${XDG_CONFIG_HOME:-}; \
export LINODE_CLI_TEST_MODE=1 XDG_CONFIG_HOME=/tmp/linode/.config; \
pytest -v tests/unit; \
export XDG_CONFIG_HOME=$$orig_xdg_config_home

.PHONY: testint
testint:
Expand Down

0 comments on commit e7efcea

Please sign in to comment.