Skip to content

Commit e8f525b

Browse files
Migrate TestUpdateIndex from test_lib.py to lib_test.go
1 parent c5a062a commit e8f525b

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

internal/integrationtest/lib/lib_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,3 +655,12 @@ func TestInstallWithGitUrlFragmentAsBranch(t *testing.T) {
655655
// Verifies library remains installed
656656
require.DirExists(t, libInstallDir.String())
657657
}
658+
659+
func TestUpdateIndex(t *testing.T) {
660+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
661+
defer env.CleanUp()
662+
663+
stdout, _, err := cli.Run("lib", "update-index")
664+
require.NoError(t, err)
665+
require.Contains(t, string(stdout), "Downloading index: library_index.tar.bz2 downloaded")
666+
}

test/test_lib.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,6 @@ def test_install_with_zip_path(run_command, data_dir, downloads_dir):
146146
assert lib_install_dir / "README.adoc" in files
147147

148148

149-
def test_update_index(run_command):
150-
result = run_command(["lib", "update-index"])
151-
assert result.ok
152-
lines = [l.strip() for l in result.stdout.splitlines()]
153-
assert "Downloading index: library_index.tar.bz2 downloaded" in lines
154-
155-
156149
def test_uninstall(run_command):
157150
libs = ["Arduino_BQ24195", "WiFiNINA"]
158151
assert run_command(["lib", "install"] + libs)

0 commit comments

Comments
 (0)