mirror of https://github.com/hashicorp/consul
config: remove redundant code
parent
0faff32c73
commit
6780964eb8
|
@ -3,7 +3,6 @@
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net"
|
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
@ -23,9 +22,6 @@ func TestSegments(t *testing.T) {
|
||||||
json: []string{`{ "server": true, "segment": "a" }`},
|
json: []string{`{ "server": true, "segment": "a" }`},
|
||||||
hcl: []string{` server = true segment = "a" `},
|
hcl: []string{` server = true segment = "a" `},
|
||||||
err: `Network segments are not supported in this version of Consul`,
|
err: `Network segments are not supported in this version of Consul`,
|
||||||
privatev4: func() ([]*net.IPAddr, error) {
|
|
||||||
return []*net.IPAddr{ipAddr("10.0.0.1")}, nil
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
desc: "segment port must be set",
|
desc: "segment port must be set",
|
||||||
|
@ -44,9 +40,6 @@ func TestSegments(t *testing.T) {
|
||||||
json: []string{`{ "segments":[{ "name":"x", "port": 123 }] }`},
|
json: []string{`{ "segments":[{ "name":"x", "port": 123 }] }`},
|
||||||
hcl: []string{`segments = [{ name = "x" port = 123 }]`},
|
hcl: []string{`segments = [{ name = "x" port = 123 }]`},
|
||||||
err: `Network segments are not supported in this version of Consul`,
|
err: `Network segments are not supported in this version of Consul`,
|
||||||
privatev4: func() ([]*net.IPAddr, error) {
|
|
||||||
return []*net.IPAddr{ipAddr("10.0.0.1")}, nil
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue