Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add TestCoreInstallRunsToolPostInstallScript to core_test.go
  • Loading branch information
MatteoPologruto committed Feb 20, 2023
commit 748c4390565de93a8b9da58032c0877701928aed
15 changes: 15 additions & 0 deletions internal/integrationtest/core/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,18 @@ func TestCoreInstallCreatesInstalledJson(t *testing.T) {
sortedExpected := requirejson.Parse(t, expectedInstalledJson).Query("walk(if type == \"array\" then sort else . end)").String()
require.JSONEq(t, sortedExpected, sortedInstalled)
}

func TestCoreInstallRunsToolPostInstallScript(t *testing.T) {
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
defer env.CleanUp()

url := "http://drazzy.com/package_drazzy.com_index.json"

_, _, err := cli.Run("core", "update-index", "--additional-urls", url)
require.NoError(t, err)

// Checks that the post_install script is correctly skipped on the CI
stdout, _, err := cli.Run("core", "install", "ATTinyCore:avr", "--verbose", "--additional-urls", url)
require.NoError(t, err)
require.Contains(t, string(stdout), "Skipping tool configuration.")
}