Skip to content

Commit 3dfa496

Browse files
committed
fix(tests): handle error when removing config file in test
1 parent e4e926e commit 3dfa496

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

config/config_linux_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ func TestIfHomeDoesNotContainConfigTheDefaultConfigAreCopied(t *testing.T) {
6262

6363
os.Unsetenv("ARDUINO_CREATE_AGENT_CONFIG")
6464
// we want to test the case when the config does not exist in the home directory
65-
os.Remove("./testdata/home-without-config/.config/ArduinoCreateAgent/config.ini")
65+
err := os.Remove("./testdata/home-without-config/.config/ArduinoCreateAgent/config.ini")
66+
if err != nil {
67+
t.Fatal(err)
68+
}
6669

6770
configPath := GetConfigPath()
6871

0 commit comments

Comments
 (0)