Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a test case for core search #419

Merged
merged 1 commit into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ require (
go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45
golang.org/x/net v0.0.0-20190311183353-d8887717615a
golang.org/x/text v0.3.0
google.golang.org/appengine v1.4.0 // indirect
google.golang.org/genproto v0.0.0-20190327125643-d831d65fe17d // indirect
google.golang.org/grpc v1.21.1
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect
Expand Down
10 changes: 9 additions & 1 deletion test/test_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,15 @@ def test_core_listall(run_command):
def test_core_search(run_command):
url = "https://raw.githubusercontent.com/arduino/arduino-cli/master/test/testdata/test_index.json"
assert run_command("core update-index --additional-urls={}".format(url))
# default search
# list all
result = run_command("core search")
assert result.ok
assert 3 < len(result.stdout.splitlines())
result = run_command("core search --format json")
assert result.ok
data = json.loads(result.stdout)
assert 1 < len(data)
# search a specific core
result = run_command("core search avr")
assert result.ok
assert 2 < len(result.stdout.splitlines())
Expand Down