Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
backupninja
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Liberate
backupninja
Commits
8d9b0418
Commit
8d9b0418
authored
Jul 15, 2018
by
Jérôme Charaoui
Browse files
Options
Downloads
Patches
Plain Diff
tests: replace test_sh() with setup_sh()
parent
26e530ea
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!46
Add a testsuite
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/sh.bats
+1
-2
1 addition, 2 deletions
test/sh.bats
with
1 addition
and
2 deletions
test/sh.bats
+
1
−
2
View file @
8d9b0418
load common
load common
test
_sh() {
setup
_sh() {
cat << EOF > "${BATS_TMPDIR}/backup.d/test.sh"
cat << EOF > "${BATS_TMPDIR}/backup.d/test.sh"
!#/bin/sh
!#/bin/sh
touch /var/backups/test_sh
touch /var/backups/test_sh
...
@@ -10,7 +10,6 @@ EOF
...
@@ -10,7 +10,6 @@ EOF
}
}
@test "sh: runs and creates file" {
@test "sh: runs and creates file" {
test_sh
run backupninja -f "${BATS_TMPDIR}/backupninja.conf" --now --run "${BATS_TMPDIR}/backup.d/test.sh"
run backupninja -f "${BATS_TMPDIR}/backupninja.conf" --now --run "${BATS_TMPDIR}/backup.d/test.sh"
[ "$status" -eq 0 ]
[ "$status" -eq 0 ]
[ -f /var/backups/test_sh ]
[ -f /var/backups/test_sh ]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment