aboutsummaryrefslogtreecommitdiffstats
path: root/test/config_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/config_test.go')
-rw-r--r--test/config_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/config_test.go b/test/config_test.go
index 2b95e85..1b3120f 100644
--- a/test/config_test.go
+++ b/test/config_test.go
@@ -23,7 +23,7 @@ import (
"testing"
"gerrit.automotivelinux.org/gerrit/src/xds/xds-server/lib/xsapiv1"
- "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
func CheckIP(ipconfig string) bool {
@@ -41,13 +41,13 @@ func CheckIP(ipconfig string) bool {
func TestConfig(t *testing.T) {
var cfg xsapiv1.APIConfig
- assert.Nil(t, HTTPCli.Get("/config", &cfg))
+ require.Nil(t, HTTPCli.Get("/config", &cfg))
Debugf(t, "Config is %v", cfg)
re := regexp.MustCompile("^[0-9a-z]+-[0-9a-z]+-[0-9a-z]+-[0-9a-z]+-[0-9a-z]+$")
- assert.True(t, re.MatchString(cfg.ServerUID)) //ID
+ require.True(t, re.MatchString(cfg.ServerUID)) //ID
pathMap, present := cfg.SupportedSharing["PathMap"]
- assert.True(t, present)
- assert.True(t, pathMap)
- assert.True(t, CheckIP(cfg.Builder.IP))
+ require.True(t, present)
+ require.True(t, pathMap)
+ require.True(t, CheckIP(cfg.Builder.IP))
}