@@ -21,22 +21,15 @@ import (
21
21
"testing"
22
22
23
23
"github.com/arduino/arduino-cli/internal/integrationtest"
24
- "github.com/arduino/go-paths-helper"
25
24
"github.com/stretchr/testify/require"
26
25
semver "go.bug.st/relaxed-semver"
27
- "go.bug.st/testsuite"
28
- "go.bug.st/testsuite/requirejson"
26
+ "go.bug.st/testifyjson/requirejson"
29
27
)
30
28
31
29
func TestHelp (t * testing.T ) {
32
- env := testsuite . NewEnvironment (t )
30
+ env , cli := integrationtest . CreateArduinoCLIWithEnvironment (t )
33
31
defer env .CleanUp ()
34
32
35
- cli := integrationtest .NewArduinoCliWithinEnvironment (env , & integrationtest.ArduinoCLIConfig {
36
- ArduinoCLIPath : paths .New (".." , ".." , ".." , "arduino-cli" ),
37
- UseSharedStagingFolder : true ,
38
- })
39
-
40
33
// Run help and check the output message
41
34
stdout , stderr , err := cli .Run ("help" )
42
35
require .NoError (t , err )
@@ -45,14 +38,9 @@ func TestHelp(t *testing.T) {
45
38
}
46
39
47
40
func TestVersion (t * testing.T ) {
48
- env := testsuite . NewEnvironment (t )
41
+ env , cli := integrationtest . CreateArduinoCLIWithEnvironment (t )
49
42
defer env .CleanUp ()
50
43
51
- cli := integrationtest .NewArduinoCliWithinEnvironment (env , & integrationtest.ArduinoCLIConfig {
52
- ArduinoCLIPath : paths .New (".." , ".." , ".." , "arduino-cli" ),
53
- UseSharedStagingFolder : true ,
54
- })
55
-
56
44
// Run version and check the output message
57
45
stdout , stderr , err := cli .Run ("version" )
58
46
require .NoError (t , err )
@@ -87,14 +75,9 @@ func TestVersion(t *testing.T) {
87
75
88
76
func TestLogOptions (t * testing.T ) {
89
77
// Using version as a test command
90
- env := testsuite . NewEnvironment (t )
78
+ env , cli := integrationtest . CreateArduinoCLIWithEnvironment (t )
91
79
defer env .CleanUp ()
92
80
93
- cli := integrationtest .NewArduinoCliWithinEnvironment (env , & integrationtest.ArduinoCLIConfig {
94
- ArduinoCLIPath : paths .New (".." , ".." , ".." , "arduino-cli" ),
95
- UseSharedStagingFolder : true ,
96
- })
97
-
98
81
// No logs
99
82
stdout , _ , err := cli .Run ("version" )
100
83
require .NoError (t , err )
@@ -143,14 +126,9 @@ func TestLogOptions(t *testing.T) {
143
126
144
127
func TestInventoryCreation (t * testing.T ) {
145
128
// Using version as a test command
146
- env := testsuite . NewEnvironment (t )
129
+ env , cli := integrationtest . CreateArduinoCLIWithEnvironment (t )
147
130
defer env .CleanUp ()
148
131
149
- cli := integrationtest .NewArduinoCliWithinEnvironment (env , & integrationtest.ArduinoCLIConfig {
150
- ArduinoCLIPath : paths .New (".." , ".." , ".." , "arduino-cli" ),
151
- UseSharedStagingFolder : true ,
152
- })
153
-
154
132
// no logs
155
133
stdout , _ , err := cli .Run ("version" )
156
134
require .NoError (t , err )
0 commit comments