Skip to content

Commit 870fac5

Browse files
committed
fix(tests): simplify cleanup in TestIfHomeDoesNotContainConfigTheDefaultConfigAreCopied
1 parent 504ce7e commit 870fac5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

config/config_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,8 @@ func TestIfHomeDoesNotContainConfigTheDefaultConfigAreCopied(t *testing.T) {
6666
os.Setenv("HOME", "./testdata/home-without-config")
6767

6868
os.Unsetenv("ARDUINO_CREATE_AGENT_CONFIG")
69-
// we want to test the case when the config does not exist in the home directory
70-
err := os.Remove("./testdata/home-without-config/.config/ArduinoCreateAgent/config.ini")
71-
if err != nil {
72-
t.Fatal(err)
73-
}
69+
// Clean the home folder by deleting the config.ini
70+
os.Remove("./testdata/home-without-config/.config/ArduinoCreateAgent/config.ini")
7471

7572
configPath := GetConfigPath()
7673

0 commit comments

Comments
 (0)