Skip to content

Commit

Permalink
Fix: Assertion errors did not display missing path
Browse files Browse the repository at this point in the history
  • Loading branch information
hoh authored and olethanh committed Apr 10, 2024
1 parent 6d1482d commit d660948
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/aleph/vm/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,17 @@ def check(self):
assert self.FAKE_DATA_RUNTIME, "Local runtime .squashfs build not specified"
assert self.FAKE_DATA_VOLUME, "Local data volume .squashfs not specified"

assert isdir(self.FAKE_DATA_PROGRAM), "Local fake program directory is missing"
assert isfile(self.FAKE_DATA_MESSAGE), "Local fake message is missing"
assert isdir(self.FAKE_DATA_DATA), "Local fake data directory is missing"
assert isfile(self.FAKE_DATA_RUNTIME), "Local runtime .squashfs build is missing"
assert isfile(self.FAKE_DATA_VOLUME), "Local data volume .squashfs is missing"
assert isdir(
self.FAKE_DATA_PROGRAM
), f"Local fake program directory is missing, no directory '{self.FAKE_DATA_PROGRAM}'"
assert isfile(self.FAKE_DATA_MESSAGE), f"Local fake message '{self.FAKE_DATA_MESSAGE}' not found"
assert isdir(self.FAKE_DATA_DATA), f"Local fake data directory '{self.FAKE_DATA_DATA}' is missing"
assert isfile(
self.FAKE_DATA_RUNTIME
), f"Local runtime '{self.FAKE_DATA_RUNTIME}' is missing, did you build it ?"
assert isfile(
self.FAKE_DATA_VOLUME
), f"Local data volume '{self.FAKE_DATA_VOLUME}' is missing, did you build it ?"

assert is_command_available("setfacl"), "Command `setfacl` not found, run `apt install acl`"
if self.USE_NDP_PROXY:
Expand Down

0 comments on commit d660948

Please sign in to comment.