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

Fix typo where there should be a set and not a list in request packages #488

Merged
merged 2 commits into from
Apr 20, 2023
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
2 changes: 1 addition & 1 deletion asu/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def validate_packages(req):
else:
tr.add(p)

req["packages"] = list(map(lambda x: remove_prefix(x, "+"), sorted(tr)))
req["packages"] = set(map(lambda x: remove_prefix(x, "+"), sorted(tr)))

# store request packages temporary in Redis and create a diff
temp = str(uuid4())
Expand Down
14 changes: 14 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,3 +554,17 @@ def test_api_build_defaults_filled_allowed(app, upstream):
)
assert response.status == "200 OK"
assert response.json.get("request_hash") == "95850740d931c460d77f8de35f298b9a"

def test_api_build_diff_packages(client, upstream):
response = client.post(
"/api/v1/build",
json=dict(
version="TESTVERSION",
target="testtarget/testsubtarget",
profile="testprofile",
packages=["test1", "test2"],
diff_packages=True,
),
)

assert response.status == "200 OK"