Skip to content

Commit 6129aac

Browse files
committed
Fix integration tests
1 parent ed7e96f commit 6129aac

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

cli/update/update.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ func runUpdateCommand(cmd *cobra.Command, args []string) {
7878
}
7979

8080
if updateFlags.showOutdated {
81+
// To show outdated platforms and libraries we need to initialize our instance
82+
// otherwise nothing would be shown
83+
for _, err := range instance.Init(inst) {
84+
feedback.Errorf("Error initializing instance: %v", err)
85+
}
86+
8187
outdatedResp, err := commands.Outdated(context.Background(), &rpc.OutdatedRequest{
8288
Instance: inst,
8389
})

test/test_compile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,9 @@ def test_compile_with_invalid_url(run_command, data_dir):
544544

545545
# Verifies compilation fails cause of missing local index file
546546
res = run_command(f'compile -b {fqbn} "{sketch_path}"')
547-
assert res.failed
547+
assert res.ok
548548
lines = [l.strip() for l in res.stderr.splitlines()]
549-
assert "Error creating instance: error loading platform index:" in lines
549+
assert "Error initializing instance: Loading index file: loading json index file" in lines[0]
550550
expected_index_file = Path(data_dir, "package_example_index.json")
551551
assert f"loading json index file {expected_index_file}: " + f"open {expected_index_file}:" in lines[-1]
552552

test/test_lib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_list(run_command):
5656
result = run_command("lib list")
5757
assert result.ok
5858
assert "" == result.stderr
59-
assert "No libraries installed." == result.stdout.strip()
59+
assert "No libraries installed." in result.stdout.strip()
6060
result = run_command("lib list --format json")
6161
assert result.ok
6262
assert "" == result.stderr
@@ -517,7 +517,7 @@ def test_lib_list_with_updatable_flag(run_command):
517517
result = run_command("lib list --updatable")
518518
assert result.ok
519519
assert "" == result.stderr
520-
assert "No updates available." == result.stdout.strip()
520+
assert "No updates available." in result.stdout.strip()
521521
# No library to update in json
522522
result = run_command("lib list --updatable --format json")
523523
assert result.ok

0 commit comments

Comments
 (0)