Skip to content

Commit

Permalink
test: remove obsolete case
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Bianconi committed Feb 23, 2023
1 parent 4d787f1 commit 8aec70c
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions configuration/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,4 @@ func TestFindConfigFile(t *testing.T) {

configFile = FindConfigFileInArgs([]string{})
require.Equal(t, "", configFile)

// Create temporary directories
tmp := tmpDirOrDie()
defer os.RemoveAll(tmp)
target := filepath.Join(tmp, "foo", "bar", "baz")
os.MkdirAll(target, os.ModePerm)
require.Nil(t, os.Chdir(target))

// Create a config file
f, err := os.Create(filepath.Join(target, "..", "..", "arduino-cli.yaml"))
require.Nil(t, err)
f.Close()

configFile = FindConfigFileInArgs([]string{})
require.Equal(t, filepath.Join(tmp, "foo", "arduino-cli.yaml"), configFile)

// Create another config file
f, err = os.Create(filepath.Join(target, "arduino-cli.yaml"))
require.Nil(t, err)
f.Close()

configFile = FindConfigFileInArgs([]string{})
require.Equal(t, filepath.Join(target, "arduino-cli.yaml"), configFile)
}

0 comments on commit 8aec70c

Please sign in to comment.