command/server: fix TestLoadConfigFile_json2 test, fix hcl tags (#7300)

* command/server: fix TestLoadConfigFile_json2 test, fix hcl tags

Fixes test to call the equality check, and add missing values to the expected object. Fixes hcl tags in the Telemetry structs.

* fix PrometheusRetentionTime tag
This commit is contained in:
Calvin Leung Huang
2019-08-14 07:32:11 -07:00
committed by Jeff Mitchell
parent 28e8973073
commit d0d17ed40e
2 changed files with 11 additions and 7 deletions

View File

@@ -247,7 +247,6 @@ func TestLoadConfigFile_json2(t *testing.T) {
Config: map[string]string{
"foo": "bar",
},
DisableClustering: true,
},
HAStorage: &Storage{
@@ -255,15 +254,19 @@ func TestLoadConfigFile_json2(t *testing.T) {
Config: map[string]string{
"bar": "baz",
},
DisableClustering: true,
},
CacheSize: 45678,
EnableUI: true,
EnableUI: true,
EnableUIRaw: true,
EnableRawEndpoint: true,
EnableRawEndpoint: true,
EnableRawEndpointRaw: true,
DisableSealWrap: true,
DisableSealWrap: true,
DisableSealWrapRaw: true,
Telemetry: &Telemetry{
StatsiteAddr: "foo",
@@ -287,6 +290,7 @@ func TestLoadConfigFile_json2(t *testing.T) {
},
}
if !reflect.DeepEqual(config, expected) {
t.Fatalf("expected \n\n%#v\n\n to be \n\n%#v\n\n", config, expected)
}
}