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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guillaume Subiron
backupninja
Commits
21ff09e2
Verified
Commit
21ff09e2
authored
2 years ago
by
Jérôme Charaoui
Browse files
Options
Downloads
Patches
Plain Diff
add test for reportemail = no
parent
51cd0778
Branches
master
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/backupninja.bats
+11
-0
11 additions, 0 deletions
test/backupninja.bats
with
11 additions
and
0 deletions
test/backupninja.bats
+
11
−
0
View file @
21ff09e2
...
@@ -3,6 +3,7 @@ load common
...
@@ -3,6 +3,7 @@ load common
teardown_backupninja() {
teardown_backupninja() {
[ -x /usr/bin/mail.moved ] && mv /usr/bin/mail.moved /usr/bin/mail
[ -x /usr/bin/mail.moved ] && mv /usr/bin/mail.moved /usr/bin/mail
[ -x /usr/bin/rsync.moved ] && mv /usr/bin/rsync.moved /usr/bin/rsync
[ -x /usr/bin/rsync.moved ] && mv /usr/bin/rsync.moved /usr/bin/rsync
rm -f /var/mail/vagrant
}
}
create_test_action() {
create_test_action() {
...
@@ -235,6 +236,16 @@ create_test_action() {
...
@@ -235,6 +236,16 @@ create_test_action() {
[ "$status" -eq 1 ]
[ "$status" -eq 1 ]
}
}
@test "reports: email not sent when reportemail is no" {
create_test_action info test_info
setconfig backupninja.conf reportsuccess yes
setconfig backupninja.conf reportinfo yes
setconfig backupninja.conf reportemail no
run backupninja --now -f "${BATS_TMPDIR}/backupninja.conf" --run "${BATS_TMPDIR}/backup.d/test.sh"
[ "$status" -eq 0 ]
! test -f /var/mail/vagrant
}
@test "scheduling: runs when = 'everyday at 01' and time matches" {
@test "scheduling: runs when = 'everyday at 01' and time matches" {
create_test_action info test_info
create_test_action info test_info
setconfig backupninja.conf when 'everyday at 01'
setconfig backupninja.conf when 'everyday at 01'
...
...
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