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

vdk-control-cli: import the latest version of the client into cli #1969

Merged
merged 10 commits into from
Apr 27, 2023
2 changes: 1 addition & 1 deletion projects/vdk-control-cli/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ tabulate
urllib3>=1.26.5
vdk-control-api-auth

vdk-control-service-api==1.0.6
vdk-control-service-api==1.0.9
2 changes: 1 addition & 1 deletion projects/vdk-control-cli/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ install_requires =
requests>=2.25
setuptools>=47.0
pluggy
vdk-control-service-api==1.0.6
vdk-control-service-api==1.0.9
tabulate
requests_oauthlib>=1.0
urllib3>=1.26.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_deploy_reason(httpserver: PluginHTTPServer, tmpdir: LocalPath):
uri="/data-jobs/for-team/test-team/jobs/test-job/sources",
method="POST",
headers={"Content-Type": "application/octet-stream"},
query_string="reason=Example+reason",
query_string="reason=Example%20reason",
).respond_with_json(job_version.to_dict())

test_job_path = find_test_resource("test-job")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ def test_execute_with_exception(httpserver: PluginHTTPServer, tmpdir: LocalPath)
assert "what" in result.output and "why" in result.output


def _create_json_serializable_version(execution):
execution = execution.to_dict()
execution["start_time"] = execution["start_time"].isoformat()
return execution


def test_execute_no_execution_id(httpserver: PluginHTTPServer, tmpdir: LocalPath):
rest_api_url = httpserver.url_for("")
team_name = "test-team"
Expand All @@ -187,7 +193,11 @@ def test_execute_no_execution_id(httpserver: PluginHTTPServer, tmpdir: LocalPath
uri=f"/data-jobs/for-team/{team_name}/jobs/{job_name}/executions",
method="GET",
).respond_with_json(
[older_execution.to_dict(), execution.to_dict(), older_execution.to_dict()]
[
_create_json_serializable_version(older_execution),
_create_json_serializable_version(execution),
_create_json_serializable_version(older_execution),
]
)

httpserver.expect_request(
Expand Down