Skip to content

Commit

Permalink
fix: Wrong success check of vfolder cli integration test (#2140)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregataa committed May 13, 2024
1 parent 8241fd0 commit c6138c3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ai/backend/test/cli_integration/user/test_vfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,21 @@ def test_mkdir_vfolder(run_user: ClientRunnerFunc):
# Create directory in the vfolder
with closing(run_user(["vfolder", "mkdir", vfolder_name, dir_paths[0]])) as p:
p.expect(EOF)
assert "Done." in p.before.decode(), "Directory creation failed."
assert "Successfully created" in p.before.decode(), "Directory creation failed."

# Create already existing directory with exist-ok option
with closing(run_user(["vfolder", "mkdir", "-e", vfolder_name, dir_paths[0]])) as p:
p.expect(EOF)
assert "Done." in p.before.decode(), "Exist-ok option does not work properly."
assert (
"Successfully created" in p.before.decode()
), "Exist-ok option does not work properly."

# Test whether the parent directory is created automatically
with closing(run_user(["vfolder", "mkdir", "-p", vfolder_name, dir_paths[1]])) as p:
p.expect(EOF)
assert "Done." in p.before.decode(), "The parent directory is not created automatically."
assert (
"Successfully created" in p.before.decode()
), "The parent directory is not created automatically."


@pytest.mark.dependency(
Expand Down

0 comments on commit c6138c3

Please sign in to comment.