Skip to content

Commit

Permalink
WIP test ext4
Browse files Browse the repository at this point in the history
  • Loading branch information
ps-jay committed May 20, 2024
1 parent 0f004c3 commit c3b4f19
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ jobs:
- name: Setup Tests
run: bats bats/setup.bats

- name: Test ext4
run: bats bats/ext4.bats
29 changes: 29 additions & 0 deletions bats/ext4.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bats
# vim: set ft=sh sw=4 :

load helper_print-info

setup() {
# get the containing directory of this file
# use $BATS_TEST_FILENAME instead of ${BASH_SOURCE[0]} or $0,
# as those will point to the bats executable's location or the preprocessed file respectively
DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )"
# make executables in root of the repo visible to PATH
PATH="$DIR/../:$PATH"
}

@test "format loop with ext4" {
echo """
---
devices:
$(cat /tmp/loopdev):
fs: ext4
force: true
""" > /tmp/ext4-bootstrap.yaml

run sudo ebs-bootstrap -config /tmp/ext4-bootstrap.yaml

print_run_info
[ "$status" -eq 0 ] &&
[[ "$output" = *"/tmp/fs"* ]]
}

0 comments on commit c3b4f19

Please sign in to comment.