Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(tests): add base tests
  • Loading branch information
Airscript committed Aug 13, 2022
commit 0bdbfe0e463fa2d10ed1874fa461aaf32629c525
2 changes: 2 additions & 0 deletions scripts/install/bash.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/bin/sh
apk add bash
bash --version
echo "Bash installed successfully."
17 changes: 17 additions & 0 deletions tests/_.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!./tests/bats/bin/bats

setup() {
load 'libraries/bats-support/load'
load 'libraries/bats-assert/load'
source ./tests/mocks.sh
}

@test "Run Script" {
run ./scripts/bats.sh
}

@test "Install Bash" {
run ./scripts/install/bash.sh
assert_output --partial "$INSTALL_BASH"
refute_output --partial "ERROR"
}
5 changes: 5 additions & 0 deletions tests/mocks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
readonly INSTALL_BASH="Bash installed successfully."
readonly INSTALL_DOCKER_CLI="Docker CLI installed successfully."
readonly ADD_GIT_SUBMODULE_SKIPPED="Git submodule update skipped."
readonly ADD_GIT_SUBMODULE_EXECUTED="Git submodule update executed."
3 changes: 0 additions & 3 deletions tests/scripts.bats

This file was deleted.