From 14ca020c4b010a845829eed52823dfad6ba4cc9f Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 23 Nov 2020 06:53:25 -0800 Subject: [PATCH] Fix result package test At the time the test was written, there was no validation of the project path argument, so a dummy path worked fine, but now validation has been added so an existing path must be used. --- result/result_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/result/result_test.go b/result/result_test.go index 72b82a31..f0350947 100644 --- a/result/result_test.go +++ b/result/result_test.go @@ -30,7 +30,9 @@ import ( func TestWriteReport(t *testing.T) { flags := test.ConfigurationFlags() - projectPaths := []string{"/foo"} + projectPath, err := os.Getwd() // Path to an arbitrary folder that is guaranteed to exist. + require.Nil(t, err) + projectPaths := []string{projectPath} reportFolderPathString, err := ioutil.TempDir("", "arduino-check-result-TestWriteReport") require.Nil(t, err)