Skip to content

Commit

Permalink
Fix tests failing on master
Browse files Browse the repository at this point in the history
The default version was changed in #7452
which caused these tests to fail.
  • Loading branch information
dnephin committed Mar 23, 2020
1 parent 98a2d5a commit 6e10616
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 33 deletions.
4 changes: 3 additions & 1 deletion command/connect/envoy/envoy.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ type cmd struct {
meshGatewaySvcName string
}

const defaultEnvoyVersion = "1.13.1"

func (c *cmd) init() {
c.flags = flag.NewFlagSet("", flag.ContinueOnError)

Expand Down Expand Up @@ -112,7 +114,7 @@ func (c *cmd) init() {
"Set the agent's gRPC address and port (in http(s)://host:port format). "+
"Alternatively, you can specify CONSUL_GRPC_ADDR in ENV.")

c.flags.StringVar(&c.envoyVersion, "envoy-version", "1.13.1",
c.flags.StringVar(&c.envoyVersion, "envoy-version", defaultEnvoyVersion,
"Sets the envoy-version that the envoy binary has.")

c.flags.BoolVar(&c.register, "register", false,
Expand Down
34 changes: 17 additions & 17 deletions command/connect/envoy/envoy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestGenerateConfig(t *testing.T) {
Flags: []string{"-proxy-id", "test-proxy"},
Env: []string{},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand All @@ -100,7 +100,7 @@ func TestGenerateConfig(t *testing.T) {
"-token", "c9a52720-bf6c-4aa6-b8bc-66881a5ade95"},
Env: []string{},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand All @@ -119,7 +119,7 @@ func TestGenerateConfig(t *testing.T) {
"CONSUL_HTTP_TOKEN=c9a52720-bf6c-4aa6-b8bc-66881a5ade95",
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand All @@ -141,7 +141,7 @@ func TestGenerateConfig(t *testing.T) {
"token.txt": "c9a52720-bf6c-4aa6-b8bc-66881a5ade95",
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand All @@ -163,7 +163,7 @@ func TestGenerateConfig(t *testing.T) {
"token.txt": "c9a52720-bf6c-4aa6-b8bc-66881a5ade95",
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand All @@ -181,7 +181,7 @@ func TestGenerateConfig(t *testing.T) {
"-grpc-addr", "localhost:9999"},
Env: []string{},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
// Should resolve IP, note this might not resolve the same way
Expand All @@ -202,7 +202,7 @@ func TestGenerateConfig(t *testing.T) {
"CONSUL_GRPC_ADDR=localhost:9999",
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
// Should resolve IP, note this might not resolve the same way
Expand All @@ -222,7 +222,7 @@ func TestGenerateConfig(t *testing.T) {
"-grpc-addr", "unix:///var/run/consul.sock"},
Env: []string{},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentSocket: "/var/run/consul.sock",
Expand All @@ -237,7 +237,7 @@ func TestGenerateConfig(t *testing.T) {
Flags: []string{"-proxy-id", "test-proxy"},
GRPCPort: 9999,
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
// Should resolve IP, note this might not resolve the same way
Expand All @@ -256,7 +256,7 @@ func TestGenerateConfig(t *testing.T) {
Flags: []string{"-proxy-id", "test-proxy", "-admin-access-log-path", "/some/path/access.log"},
Env: []string{},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
// Should resolve IP, note this might not resolve the same way
Expand All @@ -275,7 +275,7 @@ func TestGenerateConfig(t *testing.T) {
Flags: []string{"-proxy-id", "test-proxy", "-ca-file", "some/path"},
Env: []string{},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
// Should resolve IP, note this might not resolve the same way
Expand All @@ -291,7 +291,7 @@ func TestGenerateConfig(t *testing.T) {
Flags: []string{"-proxy-id", "test-proxy", "-ca-file", "../../../test/ca/root.cer"},
Env: []string{"CONSUL_HTTP_SSL=1"},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
// Should resolve IP, note this might not resolve the same way
Expand Down Expand Up @@ -334,7 +334,7 @@ func TestGenerateConfig(t *testing.T) {
}`,
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand Down Expand Up @@ -367,7 +367,7 @@ func TestGenerateConfig(t *testing.T) {
}`,
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand Down Expand Up @@ -405,7 +405,7 @@ func TestGenerateConfig(t *testing.T) {
} , { "name": "fake_sink_2" }`,
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand All @@ -430,7 +430,7 @@ func TestGenerateConfig(t *testing.T) {
}`,
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand Down Expand Up @@ -485,7 +485,7 @@ func TestGenerateConfig(t *testing.T) {
}`,
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
EnvoyVersion: defaultEnvoyVersion,
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/access-log-path.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/defaults.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/existing-ca-file.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/extra_-multiple.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/extra_-single.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/grpc-addr-config.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/grpc-addr-env.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/grpc-addr-flag.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/grpc-addr-unix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/token-arg.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/token-env.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/token-file-arg.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
2 changes: 1 addition & 1 deletion command/connect/envoy/testdata/token-file-env.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
"envoy_version": "1.13.0"
"envoy_version": "1.13.1"
}
},
"static_resources": {
Expand Down

0 comments on commit 6e10616

Please sign in to comment.