-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,39 @@ | ||
#!/usr/bin/env bats | ||
|
||
@test "Prints help on -h" { | ||
run /redis-dump-go -h | ||
[ "${lines[0]}" == 'Usage: /redis-dump-go [OPTION]...' ] | ||
[ "$status" -eq 0 ] | ||
} | ||
|
||
@test "fail on incorrect parameters" { | ||
run /redis-dump-go -fail | ||
[ "$status" -eq 1 ] | ||
} | ||
|
||
@test "Pass when using a non-default db" { | ||
run tests/select-db.sh | ||
[ "$status" -eq 0 ] | ||
} | ||
|
||
@test "Pass when using a non-default db, and a password" { | ||
run tests/select-db-with-password.sh | ||
[ "$status" -eq 0 ] | ||
} | ||
|
||
@test "Dumping / restoring all databases" { | ||
run tests/multiple-dbs.sh | ||
[ "$status" -eq 0 ] | ||
} | ||
|
||
# https://github.com/yannh/redis-dump-go/issues/11 | ||
# https://github.com/yannh/redis-dump-go/issues/18 | ||
@test "Pass when importing a ZSET with 1M entries" { | ||
run tests/large-zset.sh | ||
[ "$status" -eq 0 ] | ||
} | ||
|
||
@test "Pass when importing 1M key/values" { | ||
run tests/1mkeys.sh | ||
[ "$status" -eq 0 ] | ||
} |
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