aboutsummaryrefslogtreecommitdiffstats
path: root/test/sdks_test.go
diff options
context:
space:
mode:
authorClément Bénier <clement.benier@iot.bzh>2018-08-21 17:56:10 +0200
committerClément Bénier <clement.benier@iot.bzh>2018-08-21 17:56:10 +0200
commitb1d091a8c6b2269601a1683e963d0e382cd0f7f6 (patch)
treeec60f14ec47211e929d144bde128fbbff5f7c0dc /test/sdks_test.go
parent4192072863ac0997b0c3cb4131ea913e6f85f83e (diff)
test logs: hide log
logs are printable with VERBOSE != "" Change-Id: I170aed2e73db673ba6276410b1dddd3389239457 Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
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))
}