Merge pull request #8 from YuSungDuk/support_ncloud

fix Run method arguments for testing
This commit is contained in:
Yu SungDuk 2018-01-30 10:20:36 +09:00 committed by GitHub
commit b002e90012
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 30 additions and 20 deletions

View File

@ -1,6 +1,7 @@
package ncloud
import (
"context"
"fmt"
"testing"
@ -20,7 +21,7 @@ func TestStepCreateBlockStorageInstanceShouldFailIfOperationCreateBlockStorageIn
stateBag := createTestStateBagStepCreateBlockStorageInstance()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionHalt {
t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
@ -43,7 +44,7 @@ func TestStepCreateBlockStorageInstanceShouldPassIfOperationCreateBlockStorageIn
stateBag := createTestStateBagStepCreateBlockStorageInstance()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionContinue {
t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)

View File

@ -1,6 +1,7 @@
package ncloud
import (
"context"
"fmt"
"testing"
@ -16,7 +17,7 @@ func TestStepCreateLoginKeyShouldFailIfOperationCreateLoginKeyFails(t *testing.T
stateBag := createTestStateBagStepCreateLoginKey()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionHalt {
t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
@ -36,7 +37,7 @@ func TestStepCreateLoginKeyShouldPassIfOperationCreateLoginKeyPasses(t *testing.
stateBag := createTestStateBagStepCreateLoginKey()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionContinue {
t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)

View File

@ -1,6 +1,7 @@
package ncloud
import (
"context"
"fmt"
"testing"
@ -20,7 +21,7 @@ func TestStepCreatePublicIPInstanceShouldFailIfOperationCreatePublicIPInstanceFa
stateBag := createTestStateBagStepCreateServerImage()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionHalt {
t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
@ -47,7 +48,7 @@ func TestStepCreatePublicIPInstanceShouldPassIfOperationCreatePublicIPInstancePa
stateBag := createTestStateBagStepCreatePublicIPInstance()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionContinue {
t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)

View File

@ -1,6 +1,7 @@
package ncloud
import (
"context"
"fmt"
"testing"
@ -20,7 +21,7 @@ func TestStepCreateServerImageShouldFailIfOperationCreateServerImageFails(t *tes
stateBag := createTestStateBagStepCreateServerImage()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionHalt {
t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
@ -39,7 +40,7 @@ func TestStepCreateServerImageShouldPassIfOperationCreateServerImagePasses(t *te
stateBag := createTestStateBagStepCreateServerImage()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionContinue {
t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)

View File

@ -1,6 +1,7 @@
package ncloud
import (
"context"
"fmt"
"testing"
@ -18,7 +19,7 @@ func TestStepCreateServerInstanceShouldFailIfOperationCreateFails(t *testing.T)
stateBag := createTestStateBagStepCreateServerInstance()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionHalt {
t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
@ -38,7 +39,7 @@ func TestStepCreateServerInstanceShouldPassIfOperationCreatePasses(t *testing.T)
stateBag := createTestStateBagStepCreateServerInstance()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionContinue {
t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)

View File

@ -1,6 +1,7 @@
package ncloud
import (
"context"
"fmt"
"testing"
@ -17,7 +18,7 @@ func TestStepDeleteBlockStorageInstanceShouldFailIfOperationDeleteBlockStorageIn
stateBag := createTestStateBagStepDeleteBlockStorageInstance()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionHalt {
t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
@ -38,7 +39,7 @@ func TestStepDeleteBlockStorageInstanceShouldPassIfOperationDeleteBlockStorageIn
stateBag := createTestStateBagStepDeleteBlockStorageInstance()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionContinue {
t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)

View File

@ -1,6 +1,7 @@
package ncloud
import (
"context"
"fmt"
"testing"
@ -16,7 +17,7 @@ func TestStepGetRootPasswordShouldFailIfOperationGetRootPasswordFails(t *testing
stateBag := DeleteTestStateBagStepGetRootPassword()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionHalt {
t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
@ -36,7 +37,7 @@ func TestStepGetRootPasswordShouldPassIfOperationGetRootPasswordPasses(t *testin
stateBag := DeleteTestStateBagStepGetRootPassword()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionContinue {
t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)

View File

@ -1,6 +1,7 @@
package ncloud
import (
"context"
"fmt"
"testing"
@ -16,7 +17,7 @@ func TestStepStopServerInstanceShouldFailIfOperationStopFails(t *testing.T) {
stateBag := createTestStateBagStepStopServerInstance()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionHalt {
t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
@ -36,7 +37,7 @@ func TestStepStopServerInstanceShouldPassIfOperationStopPasses(t *testing.T) {
stateBag := createTestStateBagStepStopServerInstance()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionContinue {
t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)

View File

@ -1,6 +1,7 @@
package ncloud
import (
"context"
"fmt"
"testing"
@ -16,7 +17,7 @@ func TestStepTerminateServerInstanceShouldFailIfOperationTerminationFails(t *tes
stateBag := createTestStateBagStepTerminateServerInstance()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionHalt {
t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
@ -36,7 +37,7 @@ func TestStepTerminateServerInstanceShouldPassIfOperationTerminationPasses(t *te
stateBag := createTestStateBagStepTerminateServerInstance()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionContinue {
t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)

View File

@ -1,6 +1,7 @@
package ncloud
import (
"context"
"fmt"
"testing"
@ -16,7 +17,7 @@ func TestStepValidateTemplateShouldFailIfValidateFails(t *testing.T) {
stateBag := createTestStateBagStepValidateTemplate()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionHalt {
t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
@ -36,7 +37,7 @@ func TestStepValidateTemplateShouldPassIfValidatePasses(t *testing.T) {
stateBag := createTestStateBagStepValidateTemplate()
var result = testSubject.Run(stateBag)
var result = testSubject.Run(context.Background(), stateBag)
if result != multistep.ActionContinue {
t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)