Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b99d879

Browse files
Migrate TestUpdateShowingOutdatedUsingLibraryWithInvalidVersion to update_test.go and delete test_update.py
1 parent 79516ef commit b99d879

File tree

2 files changed

+27
-38
lines changed

2 files changed

+27
-38
lines changed

‎internal/integrationtest/update/update_test.go‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,30 @@ func TestUpdateWithUrlInternalServerError(t *testing.T) {
9999
require.Error(t, err)
100100
require.Contains(t, string(stdout), "Downloading index: test_index.json Server responded with: 500 Internal Server Error")
101101
}
102+
103+
func TestUpdateShowingOutdatedUsingLibraryWithInvalidVersion(t *testing.T) {
104+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
105+
defer env.CleanUp()
106+
107+
_, _, err := cli.Run("update")
108+
require.NoError(t, err)
109+
110+
// Install latest version of a library
111+
_, _, err = cli.Run("lib", "install", "WiFi101")
112+
require.NoError(t, err)
113+
114+
// Verifies library doesn't get updated
115+
stdout, _, err := cli.Run("update", "--show-outdated")
116+
require.NoError(t, err)
117+
require.NotContains(t, string(stdout), "WiFi101")
118+
119+
// Changes the version of the currently installed library so that it's
120+
// invalid
121+
libPath := cli.SketchbookDir().Join("libraries", "WiFi101", "library.properties")
122+
require.NoError(t, libPath.WriteFile([]byte("name=WiFi101\nversion=1.0001")))
123+
124+
// Verifies library gets updated
125+
stdout, _, err = cli.Run("update", "--show-outdated")
126+
require.NoError(t, err)
127+
require.Contains(t, string(stdout), "WiFi101")
128+
}

‎test/test_update.py‎

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /