Skip to content

Commit

Permalink
ODSC-47592. Fix test_jobs_python_runtime.py
Browse files Browse the repository at this point in the history
- fix test_jobs_cli.py
- fix test_jobs_runs.py
  • Loading branch information
liudmylaru committed Sep 20, 2023
1 parent 73ac062 commit 5b1dd56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
20 changes: 6 additions & 14 deletions tests/integration/jobs/test_jobs_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@ def test_create_watch_delete_job(self):
run,
args=[
"-f",
os.path.join(
curr_dir,
"../yamls",
"sample_job.yaml",
"--auth",
os.environ.get("OCI_IAM_TYPE", AuthType.SECURITY_TOKEN),
),
os.path.join(curr_dir, "../yamls", "sample_job.yaml"),
"--auth",
os.environ.get("OCI_IAM_TYPE", AuthType.SECURITY_TOKEN),
],
)
assert res.exit_code == 0, res.output
Expand All @@ -43,13 +39,9 @@ def test_create_watch_delete_dataflow(self):
run,
args=[
"-f",
os.path.join(
curr_dir,
"../yamls",
"sample_dataflow.yaml",
"--auth",
os.environ.get("OCI_IAM_TYPE", AuthType.SECURITY_TOKEN),
),
os.path.join(curr_dir, "../yamls", "sample_dataflow.yaml"),
"--auth",
os.environ.get("OCI_IAM_TYPE", AuthType.SECURITY_TOKEN),
],
)
assert res.exit_code == 0, res.output
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/jobs/test_jobs_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def job_run_test_infra(self):
@staticmethod
def list_objects(uri: str) -> list:
"""Lists objects on OCI object storage."""
oci_os = fsspec.filesystem("oci", config=oci.config.from_file())
oci_os = fsspec.filesystem("oci", **default_signer())
if uri.startswith("oci://"):
uri = uri[len("oci://") :]
items = oci_os.ls(uri, detail=False, refresh=True)
Expand All @@ -126,7 +126,7 @@ def list_objects(uri: str) -> list:
@staticmethod
def remove_objects(uri: str):
"""Removes objects from OCI object storage."""
oci_os = fsspec.filesystem("oci", config=oci.config.from_file())
oci_os = fsspec.filesystem("oci", **default_signer())
try:
oci_os.rm(uri, recursive=True)
except FileNotFoundError:
Expand Down

0 comments on commit 5b1dd56

Please sign in to comment.