mirror of https://github.com/hashicorp/consul
Improved unit test (example close to actual value)
parent
208566d541
commit
303997ff55
|
@ -49,8 +49,6 @@ func TestConfigFlagsAndEdgecases(t *testing.T) {
|
||||||
dataDir := testutil.TempDir(t, "consul")
|
dataDir := testutil.TempDir(t, "consul")
|
||||||
defer os.RemoveAll(dataDir)
|
defer os.RemoveAll(dataDir)
|
||||||
|
|
||||||
metaVal := make(map[string]string)
|
|
||||||
metaVal["my"] = "value"
|
|
||||||
tests := []configTest{
|
tests := []configTest{
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
// cmd line flags
|
// cmd line flags
|
||||||
|
@ -1934,7 +1932,7 @@ func TestConfigFlagsAndEdgecases(t *testing.T) {
|
||||||
patch: func(rt *RuntimeConfig) {
|
patch: func(rt *RuntimeConfig) {
|
||||||
rt.Services = []*structs.ServiceDefinition{
|
rt.Services = []*structs.ServiceDefinition{
|
||||||
&structs.ServiceDefinition{Name: "a", Port: 80},
|
&structs.ServiceDefinition{Name: "a", Port: 80},
|
||||||
&structs.ServiceDefinition{Name: "b", Port: 90, Meta: metaVal},
|
&structs.ServiceDefinition{Name: "b", Port: 90, Meta: map[string]string{"my": "value"}},
|
||||||
}
|
}
|
||||||
rt.DataDir = dataDir
|
rt.DataDir = dataDir
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue