Skip to content

Commit 3bf44d2

Browse files
committed
Adjusted integration tests
1 parent 5b352d8 commit 3bf44d2

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

commands/instances.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB Do
419419

420420
fi, _ := os.Stat(path.String())
421421
downloadCB(&rpc.DownloadProgress{
422-
File: tr("Updating index: %s", path.Base()),
422+
File: tr("Downloading index: %s", path.Base()),
423423
TotalSize: fi.Size(),
424424
})
425425
downloadCB(&rpc.DownloadProgress{Completed: true})

test/test_core.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def test_core_install_without_updateindex(run_command):
201201
# Download samd core pinned to 1.8.6
202202
result = run_command(["core", "install", "arduino:samd@1.8.6"])
203203
assert result.ok
204-
assert "Updating index: package_index.json downloaded" in result.stdout
204+
assert "Downloading index: package_index.json downloaded" in result.stdout
205205

206206

207207
@pytest.mark.skipif(
@@ -363,7 +363,7 @@ def test_core_update_with_local_url(run_command):
363363

364364
res = run_command(["core", "update-index", f'--additional-urls="file://{test_index}"'])
365365
assert res.ok
366-
assert "Updating index: test_index.json downloaded" in res.stdout
366+
assert "Downloading index: test_index.json downloaded" in res.stdout
367367

368368

369369
def test_core_search_manually_installed_cores_not_printed(run_command, data_dir):
@@ -523,7 +523,7 @@ def test_core_search_update_index_delay(run_command, data_dir):
523523
# Verifies index update is not run
524524
res = run_command(["core", "search"])
525525
assert res.ok
526-
assert "Updating index" not in res.stdout
526+
assert "Downloading index" not in res.stdout
527527

528528
# Change edit time of package index file
529529
index_file = Path(data_dir, "package_index.json")
@@ -534,12 +534,12 @@ def test_core_search_update_index_delay(run_command, data_dir):
534534
# Verifies index update is run
535535
res = run_command(["core", "search"])
536536
assert res.ok
537-
assert "Updating index" in res.stdout
537+
assert "Downloading index" in res.stdout
538538

539539
# Verifies index update is not run again
540540
res = run_command(["core", "search"])
541541
assert res.ok
542-
assert "Updating index" not in res.stdout
542+
assert "Downloading index" not in res.stdout
543543

544544

545545
def test_core_search_sorted_results(run_command, httpserver):

test/test_lib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ def test_update_index(run_command):
402402
result = run_command(["lib", "update-index"])
403403
assert result.ok
404404
lines = [l.strip() for l in result.stdout.splitlines()]
405-
assert "Updating index: library_index.json.gz downloaded" in lines
406-
assert "Updating index: library_index.json.sig downloaded" in lines
405+
assert "Downloading index: library_index.json.gz downloaded" in lines
406+
assert "Downloading index signature: library_index.json.sig downloaded" in lines
407407

408408

409409
def test_uninstall(run_command):
@@ -453,8 +453,8 @@ def test_search(run_command):
453453
result = run_command(["lib", "search", "--names"])
454454
assert result.ok
455455
lines = [l.strip() for l in result.stdout.strip().splitlines()]
456-
assert "Updating index: library_index.json.gz downloaded" in lines
457-
assert "Updating index: library_index.json.sig downloaded" in lines
456+
assert "Downloading index: library_index.json.gz downloaded" in lines
457+
assert "Downloading index signature: library_index.json.sig downloaded" in lines
458458
libs = [l[6:].strip('"') for l in lines if "Name:" in l]
459459

460460
expected = {"WiFi101", "WiFi101OTA", "Firebase Arduino based on WiFi101"}

test/test_update.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ def test_update(run_command):
2121
assert res.ok
2222
lines = [l.strip() for l in res.stdout.splitlines()]
2323

24-
assert "Updating index: package_index.json downloaded" in lines
25-
assert "Updating index: package_index.json.sig downloaded" in lines
26-
assert "Updating index: library_index.json.gz downloaded" in lines
27-
assert "Updating index: library_index.json.sig downloaded" in lines
24+
assert "Downloading index: package_index.json downloaded" in lines
25+
assert "Downloading index signature: package_index.json.sig downloaded" in lines
26+
assert "Downloading index: library_index.json.gz downloaded" in lines
27+
assert "Downloading index signature: library_index.json.sig downloaded" in lines
2828

2929

3030
def test_update_showing_outdated(run_command):
@@ -45,10 +45,10 @@ def test_update_showing_outdated(run_command):
4545
assert result.ok
4646
lines = [l.strip() for l in result.stdout.splitlines()]
4747

48-
assert "Updating index: package_index.json downloaded" in lines
49-
assert "Updating index: package_index.json.sig downloaded" in lines
50-
assert "Updating index: library_index.json.gz downloaded" in lines
51-
assert "Updating index: library_index.json.sig downloaded" in lines
48+
assert "Downloading index: package_index.json downloaded" in lines
49+
assert "Downloading index signature: package_index.json.sig downloaded" in lines
50+
assert "Downloading index: library_index.json.gz downloaded" in lines
51+
assert "Downloading index signature: library_index.json.sig downloaded" in lines
5252
assert lines[-5].startswith("Arduino AVR Boards")
5353
assert lines[-2].startswith("USBHost")
5454

0 commit comments

Comments
 (0)