Skip to content

Commit c1c4e96

Browse files
Migrate TestCoreInstallWithoutUpdateIndex from test_core.py to core_test.go
1 parent b2dc757 commit c1c4e96

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

internal/integrationtest/core/core_test.go

+11
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,14 @@ func TestCoreUpdateIndexInternalServerError(t *testing.T) {
219219
require.Error(t, err)
220220
require.Contains(t, string(stdout), "Downloading index: test_index.json Server responded with: 500 Internal Server Error")
221221
}
222+
223+
func TestCoreInstallWithoutUpdateIndex(t *testing.T) {
224+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
225+
defer env.CleanUp()
226+
227+
// Missing "core update-index"
228+
// Download samd core pinned to 1.8.6
229+
stdout, _, err := cli.Run("core", "install", "arduino:samd@1.8.6")
230+
require.NoError(t, err)
231+
require.Contains(t, string(stdout), "Downloading index: package_index.tar.bz2 downloaded")
232+
}

test/test_core.py

-8
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@
2626
import semver
2727

2828

29-
def test_core_install_without_updateindex(run_command):
30-
# Missing "core update-index"
31-
# Download samd core pinned to 1.8.6
32-
result = run_command(["core", "install", "arduino:samd@1.8.6"])
33-
assert result.ok
34-
assert "Downloading index: package_index.tar.bz2 downloaded" in result.stdout
35-
36-
3729
@pytest.mark.skipif(
3830
platform.system() == "Windows",
3931
reason="core fails with fatal error: bits/c++config.h: No such file or directory",

0 commit comments

Comments
 (0)