dfinity / dfxvm

dfx version manager
Apache License 2.0
7 stars 5 forks source link

test: verify expected behavior if XDG_DATA_HOME is set #27

Closed ericswanson-dfinity closed 10 months ago

ericswanson-dfinity commented 10 months ago

Description

On Linux, if XDG_DATA_HOME is set, dfxvm should store dfx binaries relative to it. This PR adds tests that verify that this is so.

It also isolates commands run by tests from the host environment by clearing the Command's environment and setting a limited PATH.

This also removed the dependency from the test suite on the directories crate, instead having the test code express the expected paths directly.

How Has This Been Tested?

Added tests