Skip to content

Commit 3720d4a

Browse files
committed
Add tests for loading from alternative dockerfile names
Signed-off-by: Ethan Paul <[email protected]>
1 parent 6eb69bf commit 3720d4a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_parser.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,3 +1509,15 @@ def test_escape_directive_ignore_after_comment(self, dfparser):
15091509
'value': 'touch foo; touch bar'
15101510
}
15111511
]
1512+
1513+
def test_alt_dockerfile_names(self, tmpdir):
1514+
tmpdir = Path(tmpdir)
1515+
content = "FROM fedora:38"
1516+
out = DockerfileParser(path=tmpdir, dockerfile_filename="Containerfile")
1517+
out.content = content
1518+
1519+
assert out.dockerfile == tmpdir / "Containerfile"
1520+
assert out.dockerfile.is_file()
1521+
1522+
validate = DockerfileParser(path=tmpdir, dockerfile_filename="Containerfile")
1523+
assert validate.baseimage == out.baseimage

0 commit comments

Comments
 (0)