Chromium Code Reviews| Index: common/tsmon/config_test.go |
| diff --git a/common/tsmon/config_test.go b/common/tsmon/config_test.go |
| index 939d57eba4460ecb9c1f8ac3b4b0152c994f6695..841f40fb940c2aa5bb4d6d259a0e5f71a04aaa27 100644 |
| --- a/common/tsmon/config_test.go |
| +++ b/common/tsmon/config_test.go |
| @@ -32,6 +32,8 @@ func TestLoadConfig(t *testing.T) { |
| So(c.Endpoint, ShouldEqual, "") |
| So(c.Credentials, ShouldEqual, "") |
| So(c.AutoGenHostname, ShouldEqual, false) |
| + So(c.Hostname, ShouldEqual, "") |
| + So(c.Region, ShouldEqual, "") |
| So(err, ShouldNotBeNil) |
| }) |
| @@ -43,13 +45,22 @@ func TestLoadConfig(t *testing.T) { |
| defer tf.Close() |
| defer os.Remove(tf.Name()) |
| - tf.WriteString(`{"endpoint": "foo", "credentials": "bar", "autogen_hostname": true}`) |
| + tf.WriteString(` |
| + {"endpoint": "foo", |
|
dsansome
2016/08/09 03:28:22
Run gofmt
Sergey Berezin
2016/08/10 01:49:16
Actually, this is part of the `string`, so gofmt d
|
| + "credentials": "bar", |
| + "autogen_hostname": true, |
| + "hostname": "test_host", |
| + "region": "test_region" |
| + } |
| + `) |
| tf.Sync() |
| c, err := loadConfig(tf.Name()) |
| So(c.Endpoint, ShouldEqual, "foo") |
| So(c.Credentials, ShouldEqual, "bar") |
| So(c.AutoGenHostname, ShouldEqual, true) |
| + So(c.Hostname, ShouldEqual, "test_host") |
| + So(c.Region, ShouldEqual, "test_region") |
| So(err, ShouldBeNil) |
| }) |
| } |