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(smoke): fix timeseries delete test's usage of datahub get #11330

Merged
merged 1 commit into from
Sep 8, 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
2 changes: 1 addition & 1 deletion smoke-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ task installDev(type: Exec) {
commandLine 'bash', '-c',
"set -x && " +
"${python_executable} -m venv ${venv_name} && " +
"${venv_name}/bin/python -m pip install --upgrade pip uv wheel setuptools && " +
"${venv_name}/bin/python -m pip install --upgrade uv && " +
"set +x && source ${venv_name}/bin/activate && set -x && " +
"uv pip install -r requirements.txt && " +
"touch ${venv_name}/.build_install_dev_sentinel"
Expand Down
2 changes: 1 addition & 1 deletion smoke-test/smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ else

python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip 'uv>=0.1.10' wheel setuptools
python -m pip install --upgrade 'uv>=0.1.10'
uv pip install -r requirements.txt
fi

Expand Down
18 changes: 11 additions & 7 deletions smoke-test/tests/cli/delete_cmd/test_timeseries_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,20 @@ def datahub_get_and_verify_profile(
sync_elastic()
get_args: List[str] = ["get", "--urn", test_dataset_urn, "-a", test_aspect_name]
get_result: Result = runner.invoke(datahub, get_args)
assert get_result.exit_code == 0
try:
get_result_output_obj: Dict = json.loads(get_result.stdout)
except JSONDecodeError as e:
print("Failed to decode: " + get_result.stdout, file=sys.stderr)
raise e

if expected_profile is None:
assert not get_result_output_obj
assert get_result.exit_code != 0
assert (
test_dataset_urn in get_result.stderr and "not found" in get_result.stderr
), f"Got stderr of {get_result.stderr} in get_and_verify_profile"
else:
assert get_result.exit_code == 0
try:
get_result_output_obj: Dict = json.loads(get_result.stdout)
except JSONDecodeError as e:
print("Failed to decode: " + get_result.stdout, file=sys.stderr)
raise e

profile_from_get = DatasetProfileClass.from_obj(
get_result_output_obj["datasetProfile"]
)
Expand Down
Loading