@@ -21,22 +21,15 @@ import (
2121 "testing"
2222
2323 "github.com/arduino/arduino-cli/internal/integrationtest"
24- "github.com/arduino/go-paths-helper"
2524 "github.com/stretchr/testify/require"
2625 semver "go.bug.st/relaxed-semver"
27- "go.bug.st/testsuite"
28- "go.bug.st/testsuite/requirejson"
26+ "go.bug.st/testifyjson/requirejson"
2927)
3028
3129func TestHelp (t * testing.T ) {
32- env := testsuite . NewEnvironment (t )
30+ env , cli := integrationtest . CreateArduinoCLIWithEnvironment (t )
3331 defer env .CleanUp ()
3432
35- cli := integrationtest .NewArduinoCliWithinEnvironment (env , & integrationtest.ArduinoCLIConfig {
36- ArduinoCLIPath : paths .New (".." , ".." , ".." , "arduino-cli" ),
37- UseSharedStagingFolder : true ,
38- })
39-
4033 // Run help and check the output message
4134 stdout , stderr , err := cli .Run ("help" )
4235 require .NoError (t , err )
@@ -45,14 +38,9 @@ func TestHelp(t *testing.T) {
4538}
4639
4740func TestVersion (t * testing.T ) {
48- env := testsuite . NewEnvironment (t )
41+ env , cli := integrationtest . CreateArduinoCLIWithEnvironment (t )
4942 defer env .CleanUp ()
5043
51- cli := integrationtest .NewArduinoCliWithinEnvironment (env , & integrationtest.ArduinoCLIConfig {
52- ArduinoCLIPath : paths .New (".." , ".." , ".." , "arduino-cli" ),
53- UseSharedStagingFolder : true ,
54- })
55-
5644 // Run version and check the output message
5745 stdout , stderr , err := cli .Run ("version" )
5846 require .NoError (t , err )
@@ -87,14 +75,9 @@ func TestVersion(t *testing.T) {
8775
8876func TestLogOptions (t * testing.T ) {
8977 // Using version as a test command
90- env := testsuite . NewEnvironment (t )
78+ env , cli := integrationtest . CreateArduinoCLIWithEnvironment (t )
9179 defer env .CleanUp ()
9280
93- cli := integrationtest .NewArduinoCliWithinEnvironment (env , & integrationtest.ArduinoCLIConfig {
94- ArduinoCLIPath : paths .New (".." , ".." , ".." , "arduino-cli" ),
95- UseSharedStagingFolder : true ,
96- })
97-
9881 // No logs
9982 stdout , _ , err := cli .Run ("version" )
10083 require .NoError (t , err )
@@ -143,14 +126,9 @@ func TestLogOptions(t *testing.T) {
143126
144127func TestInventoryCreation (t * testing.T ) {
145128 // Using version as a test command
146- env := testsuite . NewEnvironment (t )
129+ env , cli := integrationtest . CreateArduinoCLIWithEnvironment (t )
147130 defer env .CleanUp ()
148131
149- cli := integrationtest .NewArduinoCliWithinEnvironment (env , & integrationtest.ArduinoCLIConfig {
150- ArduinoCLIPath : paths .New (".." , ".." , ".." , "arduino-cli" ),
151- UseSharedStagingFolder : true ,
152- })
153-
154132 // no logs
155133 stdout , _ , err := cli .Run ("version" )
156134 require .NoError (t , err )
0 commit comments