Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d39a09d

Browse filesBrowse files
Modified tests in main_test.go to use the new arduino-cli setup
1 parent 6c846b8 commit d39a09d
Copy full SHA for d39a09d

File tree

Expand file treeCollapse file tree

1 file changed

+5
-27
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-27
lines changed

‎internal/integrationtest/main/main_test.go

Copy file name to clipboardExpand all lines: internal/integrationtest/main/main_test.go
+5-27Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -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

3129
func 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

4740
func 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

8876
func 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

144127
func 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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.