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(service): properly return cli_version in api version #3699

Merged
merged 3 commits into from
Feb 5, 2024
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 renku/ui/service/serializers/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class VersionResponse(Schema):
"""Version response schema."""

latest_version = fields.String()
cli_version = fields.String()
supported_project_version = fields.Integer()
minimum_api_version = fields.String()
maximum_api_version = fields.String()
Expand Down
50 changes: 35 additions & 15 deletions tests/service/views/test_version_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ def test_version(svc_client):
assert "result" in response.json
data = response.json["result"]

assert {"latest_version", "supported_project_version", "minimum_api_version", "maximum_api_version"} == set(
data.keys()
)
assert {
"latest_version",
"cli_version",
"supported_project_version",
"minimum_api_version",
"maximum_api_version",
} == set(data.keys())
assert __version__ == data["latest_version"]
assert SUPPORTED_PROJECT_VERSION == data["supported_project_version"]
assert MINIMUM_VERSION.name == data["minimum_api_version"]
Expand All @@ -38,9 +42,13 @@ def test_version(svc_client):
assert "result" in response.json
data = response.json["result"]

assert {"latest_version", "supported_project_version", "minimum_api_version", "maximum_api_version"} == set(
data.keys()
)
assert {
"latest_version",
"cli_version",
"supported_project_version",
"minimum_api_version",
"maximum_api_version",
} == set(data.keys())
assert __version__ == data["latest_version"]
assert SUPPORTED_PROJECT_VERSION == data["supported_project_version"]
assert MINIMUM_VERSION.name == data["minimum_api_version"]
Expand All @@ -50,9 +58,13 @@ def test_version(svc_client):
assert "result" in response.json
data = response.json["result"]

assert {"latest_version", "supported_project_version", "minimum_api_version", "maximum_api_version"} == set(
data.keys()
)
assert {
"latest_version",
"cli_version",
"supported_project_version",
"minimum_api_version",
"maximum_api_version",
} == set(data.keys())
assert __version__ == data["latest_version"]
assert SUPPORTED_PROJECT_VERSION == data["supported_project_version"]
assert MINIMUM_VERSION.name == data["minimum_api_version"]
Expand All @@ -62,9 +74,13 @@ def test_version(svc_client):
assert "result" in response.json
data = response.json["result"]

assert {"latest_version", "supported_project_version", "minimum_api_version", "maximum_api_version"} == set(
data.keys()
)
assert {
"latest_version",
"cli_version",
"supported_project_version",
"minimum_api_version",
"maximum_api_version",
} == set(data.keys())
assert __version__ == data["latest_version"]
assert SUPPORTED_PROJECT_VERSION == data["supported_project_version"]
assert MINIMUM_VERSION.name == data["minimum_api_version"]
Expand All @@ -74,9 +90,13 @@ def test_version(svc_client):
assert "result" in response.json
data = response.json["result"]

assert {"latest_version", "supported_project_version", "minimum_api_version", "maximum_api_version"} == set(
data.keys()
)
assert {
"latest_version",
"cli_version",
"supported_project_version",
"minimum_api_version",
"maximum_api_version",
} == set(data.keys())
assert __version__ == data["latest_version"]
assert SUPPORTED_PROJECT_VERSION == data["supported_project_version"]
assert MINIMUM_VERSION.name == data["minimum_api_version"]
Expand Down
Loading