-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace mocked find_image tests with real ones
- Loading branch information
Showing
5 changed files
with
25 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ jobs: | |
- unit | ||
- venv | ||
- contentproviders | ||
- registry | ||
- norun | ||
# Playwright test | ||
- ui | ||
include: | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import secrets | ||
from pathlib import Path | ||
|
||
from repo2docker.__main__ import make_r2d | ||
|
||
HERE = Path(__file__).parent | ||
|
||
|
||
def test_find_image(): | ||
image_name = f"{secrets.token_hex(8)}:latest" | ||
r2d = make_r2d(["--image", image_name, "--no-run", str(HERE)]) | ||
|
||
r2d.start() | ||
|
||
assert r2d.find_image() | ||
|
||
|
||
def test_dont_find_image(): | ||
image_name = f"{secrets.token_hex(8)}:latest" | ||
r2d = make_r2d(["--image", image_name, "--no-run", str(HERE)]) | ||
|
||
# Just don't actually start the build, so image won't be found | ||
assert not r2d.find_image() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters