Commit 23b0153f authored by Cristian Maglie's avatar Cristian Maglie

Fixed integration test

parent f85af84d
...@@ -16,11 +16,9 @@ ...@@ -16,11 +16,9 @@
package compile_test package compile_test
import ( import (
"encoding/json"
"testing" "testing"
"github.com/arduino/arduino-cli/internal/integrationtest" "github.com/arduino/arduino-cli/internal/integrationtest"
"github.com/arduino/go-paths-helper"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"go.bug.st/testifyjson/requirejson" "go.bug.st/testifyjson/requirejson"
) )
...@@ -36,13 +34,9 @@ func TestCompileCommandsJSONGeneration(t *testing.T) { ...@@ -36,13 +34,9 @@ func TestCompileCommandsJSONGeneration(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
// Create a test sketch // Create a test sketch
out, _, err := cli.Run("sketch", "new", "Test", "--format", "json") _, _, err = cli.Run("sketch", "new", "Test")
require.NoError(t, err) require.NoError(t, err)
var s struct { sketchPath := cli.WorkingDir().Join("Test")
Path string `json:"sketch_path"`
}
require.NoError(t, json.Unmarshal(out, &s))
sketchPath := paths.New(s.Path)
buildPath := sketchPath.Join("build") buildPath := sketchPath.Join("build")
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment