Skip to content

Commit

Permalink
test: adding test to check chalk fails without docker
Browse files Browse the repository at this point in the history
  • Loading branch information
miki725 committed Mar 27, 2024
1 parent 81d5d9c commit a6e22f5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ def run_container(*args, **kwargs):
Docker.remove_images(list(images))


def test_no_docker(chalk: Chalk):
_, build = chalk.docker_build(
context=DOCKERFILES / "valid" / "sample_1",
env={"PATH": ""},
expected_success=False,
# dont run sanity docker subcommand
run_docker=False,
)
assert build.exit_code > 0


@pytest.mark.parametrize("buildkit", [True, False])
@pytest.mark.parametrize(
"cwd, dockerfile, tag",
Expand Down

0 comments on commit a6e22f5

Please sign in to comment.