Skip to content

Commit

Permalink
test: ✅ add test runner and configuration tree fixture
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Villard <[email protected]>
  • Loading branch information
eviweb committed Aug 30, 2022
1 parent d9c2752 commit a7d1036
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 0 deletions.
Empty file.
Empty file.
Empty file.
Empty file added config/copy/hostname2/.gitkeep
Empty file.
Empty file.
Empty file.
Empty file.
Empty file added config/link/hostname2/.gitkeep
Empty file.
2 changes: 2 additions & 0 deletions config/run/common/script1.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /usr/bin/env bash
echo "run $(readlink -f "${BASH_SOURCE}")"
2 changes: 2 additions & 0 deletions config/run/common/script2.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /usr/bin/env bash
echo "run $(readlink -f "${BASH_SOURCE}")"
2 changes: 2 additions & 0 deletions config/run/hostname1/script1.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /usr/bin/env bash
echo "run $(readlink -f "${BASH_SOURCE}")"
2 changes: 2 additions & 0 deletions config/run/hostname1/script2.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /usr/bin/env bash
echo "run $(readlink -f "${BASH_SOURCE}")"
Empty file added config/run/hostname2/.gitkeep
Empty file.
17 changes: 17 additions & 0 deletions tests/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#! /usr/bin/env bash
main_dir()
{
dirname "$(dirname "$(readlink -f "${BASH_SOURCE}")")"
}

. "$(main_dir)"/install.sh

export HOSTNAME="hostname1"

log "> Run install script..."
"$(main_dir)"/install.sh -v
log " \e[32mDone\e[0m"

log "> Clean up test env..."
[ -d "/tmp/my" ] && rm -rf "/tmp/my"
log " \e[32mDone\e[0m"

0 comments on commit a7d1036

Please sign in to comment.