builder/digitalocean: fix failing unit tests

This commit is contained in:
Mitchell Hashimoto 2015-06-10 19:31:48 -07:00
parent c9c9e2871c
commit 0e0cd28071
1 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,9 @@ import (
func testConfig() map[string]interface{} {
return map[string]interface{}{
"api_token": "bar",
"region": "nyc2",
"size": "512mb",
"image": "foo",
}
}
@ -56,6 +59,7 @@ func TestBuilderPrepare_Region(t *testing.T) {
config := testConfig()
// Test default
delete(config, "region")
warnings, err := b.Prepare(config)
if len(warnings) > 0 {
t.Fatalf("bad: %#v", warnings)
@ -87,6 +91,7 @@ func TestBuilderPrepare_Size(t *testing.T) {
config := testConfig()
// Test default
delete(config, "size")
warnings, err := b.Prepare(config)
if len(warnings) > 0 {
t.Fatalf("bad: %#v", warnings)
@ -118,6 +123,7 @@ func TestBuilderPrepare_Image(t *testing.T) {
config := testConfig()
// Test default
delete(config, "image")
warnings, err := b.Prepare(config)
if len(warnings) > 0 {
t.Fatalf("bad: %#v", warnings)