mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
test(windows): make sure files are written to the right paths during smoke tests (#3727)
I will need to set up the same paths for Linux, (#3734) and I want an automated test to make sure everything gets into the right directories. --------- Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
This commit is contained in:
@@ -7,9 +7,24 @@ BUNDLE_ID="dev.firezone.client"
|
||||
DUMP_PATH="$LOCALAPPDATA/$BUNDLE_ID/data/logs/last_crash.dmp"
|
||||
PACKAGE=firezone-gui-client
|
||||
|
||||
if [[ -z "$ProgramData" ]]; then
|
||||
echo "The env var \$ProgramData should be set to \`C:\ProgramData\` or similar"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure the files we want to check don't exist on the system yet
|
||||
stat "$LOCALAPPDATA/$BUNDLE_ID" && exit 1
|
||||
stat "$ProgramData/$BUNDLE_ID" && exit 1
|
||||
|
||||
# Run the smoke test normally
|
||||
cargo run -p "$PACKAGE" -- smoke-test
|
||||
|
||||
# Make sure the files were written in the right paths
|
||||
stat "$LOCALAPPDATA/$BUNDLE_ID/config/advanced_settings.json"
|
||||
stat "$LOCALAPPDATA/$BUNDLE_ID/data/logs/"connlib*log
|
||||
stat "$LOCALAPPDATA/$BUNDLE_ID/data/wintun.dll"
|
||||
stat "$ProgramData/$BUNDLE_ID/config/device_id.json"
|
||||
|
||||
# Delete the crash file if present
|
||||
rm -f "$DUMP_PATH"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user