Skip to content

Commit 32d7ac6

Browse files
Migrate TestCoreLoadingPackageManager from test_core.py to core_test.go
1 parent 8c1ff51 commit 32d7ac6

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

internal/integrationtest/core/core_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,3 +840,14 @@ func TestCoreListOutdatedCore(t *testing.T) {
840840
// Installed version must be older than latest
841841
require.True(t, installedVersion.LessThan(latestVersion))
842842
}
843+
844+
func TestCoreLoadingPackageManager(t *testing.T) {
845+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
846+
defer env.CleanUp()
847+
848+
// Create empty architecture folder (this condition is normally produced by `core uninstall`)
849+
require.NoError(t, cli.DataDir().Join("packages", "foovendor", "hardware", "fooarch").MkdirAll())
850+
851+
_, _, err := cli.Run("core", "list", "--all", "--format", "json")
852+
require.NoError(t, err) // this should not make the cli crash
853+
}

test/test_core.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,6 @@ def test_core_download_multiple_platforms(run_command, data_dir):
133133
assert "Invalid argument passed: Found 2 platform for reference" in res.stderr
134134

135135

136-
def test_core_loading_package_manager(run_command, data_dir):
137-
# Create empty architecture folder (this condition is normally produced by `core uninstall`)
138-
(Path(data_dir) / "packages" / "foovendor" / "hardware" / "fooarch").mkdir(parents=True)
139-
140-
result = run_command(["core", "list", "--all", "--format", "json"])
141-
assert result.ok # this should not make the cli crash
142-
143-
144136
def test_core_index_without_checksum(run_command):
145137
assert run_command(["config", "init", "--dest-dir", "."])
146138
url = "https://raw.githubusercontent.com/keyboardio/ArduinoCore-GD32-Keyboardio/ae5938af2f485910729e7d27aa233032a1cb4734/package_gd32_index.json" # noqa: E501

0 commit comments

Comments
 (0)