summaryrefslogtreecommitdiffstats
path: root/test/sdks_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/sdks_test.go')
-rw-r--r--test/sdks_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/sdks_test.go b/test/sdks_test.go
index 1e3298f..1395b16 100644
--- a/test/sdks_test.go
+++ b/test/sdks_test.go
@@ -73,7 +73,7 @@ func InitSdkDir() {
}
func RemoveSdk(t *testing.T, sdk xsapiv1.SDK, chSdks chan xsapiv1.SDK) {
- t.Logf("remove sdk %v", sdk.ID)
+ Debugf(t, "remove sdk %v", sdk.ID)
assert.Nil(t, HTTPCli.Delete("/sdks/"+sdk.ID, &sdk))
sdkFromEvt := <-chSdks //waiting for event Uninstalling
assert.Equal(t, sdk.ID, sdkFromEvt.ID)
@@ -109,7 +109,7 @@ func TestSdks(t *testing.T) {
var sdkRes xsapiv1.SDK
/*install sdk*/
- t.Logf("install sdk %v", sdk.Name)
+ Debugf(t, "install sdk %v", sdk.Name)
assert.Nil(t, HTTPCli.Post("/sdks", sdk, &sdkRes))
assert.Equal(t, sdkRes.Status, "Installing")
sdkFromEvent := <-chSdks //waiting for installing event
@@ -117,7 +117,7 @@ func TestSdks(t *testing.T) {
assert.Equal(t, sdkFromEvent.Status, "Installing")
/*abort sdk install*/
- t.Logf("abort install sdk %v", sdk.Name)
+ Debugf(t, "abort install sdk %v", sdk.Name)
assert.Nil(t, HTTPCli.Post("/sdks/abortinstall", sdk, &sdkRes))
assert.Equal(t, sdkRes.Status, "Not Installed")
sdkFromEvent = <-chSdks //waiting for not installed status*/
@@ -130,7 +130,7 @@ func installFakeSdk(t *testing.T, sdkInstall xsapiv1.SDKInstallArgs, chSdks chan
InitSdkDir()
var sdkRes xsapiv1.SDK
assert.Nil(t, HTTPCli.Post("/sdks", sdkInstall, &sdkRes))
- t.Logf("Install fake sdk %v (force=%v)", sdkRes.Name, sdkInstall.Force)
+ Debugf(t, "Install fake sdk %v (force=%v)", sdkRes.Name, sdkInstall.Force)
assert.Equal(t, sdkRes.Status, "Installing")
sdkFromEvent := <-chSdks
assert.Equal(t, sdkRes.ID, sdkFromEvent.ID)
@@ -140,7 +140,7 @@ func installFakeSdk(t *testing.T, sdkInstall xsapiv1.SDKInstallArgs, chSdks chan
assert.Equal(t, sdkRes.ID, sdkFromEvent.ID)
assert.Equal(t, "Installed", sdkFromEvent.Status)
assert.Equal(t, sdkFromEvent.LastError, "")
- t.Logf("Fake sdk %v installed", sdkFromEvent.Name)
+ Debugf(t, "Fake sdk %v installed", sdkFromEvent.Name)
return sdkFromEvent
}
@@ -169,17 +169,17 @@ func TestSdksError(t *testing.T) {
Filename: "",
Force: false,
}
- t.Logf("error while installing sdk with no ID and no Filename")
+ Debugf(t, "error while installing sdk with no ID and no Filename")
var sdkRes xsapiv1.SDK
/*error with no ID no filename*/
assert.NotNil(t, HTTPCli.Post("/sdks", sdk, &sdkRes))
sdk.ID = "42885c24-374e-3ef0-9723-0c8a05191aa"
- t.Logf("error while installing sdk with a fake id=%v", sdk.ID)
+ Debugf(t, "error while installing sdk with a fake id=%v", sdk.ID)
/*error with fake ID*/
assert.NotNil(t, HTTPCli.Post("/sdks", sdk, &sdkRes))
sdk.ID = ""
sdk.Filename = "fake"
- t.Logf("error while installing sdk with a fake filename=%v", sdk.Filename)
+ Debugf(t, "error while installing sdk with a fake filename=%v", sdk.Filename)
/*error with fake filename*/
assert.NotNil(t, HTTPCli.Post("/sdks", sdk, &sdkRes))
}