forked from fedora-iot/greenboot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move default health checks to read-only location fedora-iot#51
Signed-off-by: Jose Noguera <jnoguera@redhat.com>
- Loading branch information
Showing
13 changed files
with
47 additions
and
23 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
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
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
GREENBOOT_USR_ROOT_PATH="/usr/libexec/greenboot" | ||
GREENBOOT_ETC_ROOT_PATH="/etc/greenboot" | ||
GREENBOOT_USR_LIB_ROOT_PATH="/usr/lib/greenboot" | ||
|
||
GREENBOOT_BIN_PATH="$GREENBOOT_USR_ROOT_PATH/greenboot" | ||
GRUB2_SET_COUNTER_BIN_PATH="$GREENBOOT_USR_ROOT_PATH/greenboot-grub2-set-counter" | ||
RPM_OSTREE_CHECK_FALLBACK_PATH="$GREENBOOT_USR_ROOT_PATH/greenboot-rpm-ostree-grub2-check-fallback" | ||
GRUB2_EDITENV=/usr/bin/grub2-editenv | ||
|
||
GREENBOOT_CHECK_PATH="$GREENBOOT_ETC_ROOT_PATH/check" | ||
GREENBOOT_DEFAULT_CHECK_PATH="$GREENBOOT_USR_LIB_ROOT_PATH/check" | ||
GREENBOOT_ETC_CHECK_PATH="$GREENBOOT_ETC_ROOT_PATH/check" | ||
GREENBOOT_GREEN_PATH="$GREENBOOT_ETC_ROOT_PATH/green.d" | ||
GREENBOOT_RED_PATH="$GREENBOOT_ETC_ROOT_PATH/red.d" |
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 |
---|---|---|
@@ -1,13 +1,23 @@ | ||
load common.bash | ||
|
||
function setup() { | ||
# This checks that the /etc/greenboot/check path works as well | ||
# as the /usr/lib/greenboot/check one | ||
mv $GREENBOOT_DEFAULT_CHECK_PATH/wanted.d/* $GREENBOOT_ETC_CHECK_PATH/wanted.d/ | ||
} | ||
|
||
@test "Test greenboot with illegal command" { | ||
run $GREENBOOT_BIN_PATH bananas | ||
[ "$status" -eq 127 ] | ||
[ "$output" = "Illegal Command" ] | ||
} | ||
|
||
@test "Test greenboot check with the default hc scripts" { | ||
run $GREENBOOT_BIN_PATH check | ||
[ "$status" -eq 0 ] | ||
[[ "$output" == *"Running Required Health Check Scripts..."* ]] | ||
run $GREENBOOT_BIN_PATH check | ||
[ "$status" -eq 0 ] | ||
[[ "$output" == *"Running Required Health Check Scripts..."* ]] | ||
} | ||
|
||
function teardown() { | ||
mv $GREENBOOT_ETC_CHECK_PATH/wanted.d/* $GREENBOOT_DEFAULT_CHECK_PATH/wanted.d/ | ||
} |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Empty file modified
0
usr/libexec/greenboot/greenboot-rpm-ostree-grub2-check-fallback
100644 → 100755
Empty file.