Skip to content

Commit 18a4e7f

Browse files
committed
Create Dockerfiles at the location the 'build_image' command expects
1 parent 45afe7c commit 18a4e7f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/cli/test_build_images.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import grp
22
import os
33
import sys
4+
from pathlib import Path
45
from unittest.mock import call, patch
56

67
import pytest
@@ -12,7 +13,7 @@
1213
] = (
1314
# Images | Tags | Source | Destination | User ID | Group ID | Group Name | Dry Run
1415
# Default settings
15-
([f"test_image_{n}" for n in range(1)], [], "", "", "", "", "", False),
16+
([f"test_image_{n}" for n in range(3)], [], "", "", "", "", "", False),
1617
)
1718

1819

@@ -83,6 +84,11 @@ def test_run(
8384
for image in images
8485
]
8586

87+
# Create Dockerfiles at the location it expects
88+
for image in images:
89+
dockerfile = Path(src if src else def_src) / "Dockerfiles" / image
90+
dockerfile.touch(exist_ok=True)
91+
8692
# Run the function with the command
8793
run()
8894

0 commit comments

Comments
 (0)