This pull request switches testing to use an actual docker daemon, vs mocking everything out. It may also catch actual breaking issues in our tests, which is great!
22 lines
669 B
Bash
Executable File
22 lines
669 B
Bash
Executable File
#!/usr/bin/env bats
|
|
load test_helper
|
|
|
|
@test "($PLUGIN_COMMAND_PREFIX:create) success" {
|
|
run dokku "$PLUGIN_COMMAND_PREFIX:create" l
|
|
assert_contains "${lines[*]}" "container created: l"
|
|
dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" l
|
|
}
|
|
|
|
@test "($PLUGIN_COMMAND_PREFIX:create) error when there are no arguments" {
|
|
run dokku "$PLUGIN_COMMAND_PREFIX:create"
|
|
assert_contains "${lines[*]}" "Please specify a valid name for the service"
|
|
}
|
|
|
|
@test "($PLUGIN_COMMAND_PREFIX:create) error when there is an invalid name specified" {
|
|
run dokku "$PLUGIN_COMMAND_PREFIX:create" d.erp
|
|
assert_failure
|
|
|
|
run dokku "$PLUGIN_COMMAND_PREFIX:create" d-erp
|
|
assert_failure
|
|
}
|