Skip to content

Commit

Permalink
updates to tests (envoyproxy#94)
Browse files Browse the repository at this point in the history
Signed-off-by: Kuat Yessenov <[email protected]>
  • Loading branch information
kyessenov authored Jul 12, 2018
1 parent c147045 commit 8cef83f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
4 changes: 3 additions & 1 deletion build/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ SERVER_PID=$!

# Envoy start-up command
ENVOY=${ENVOY:-/usr/local/bin/envoy}
ENVOY_LOG="envoy.log"

# Start envoy: important to keep drain time short
(${ENVOY} -c sample/bootstrap-${XDS}.yaml --drain-time-s 1 --v2-config-only -l debug 2> envoy.log)&
(${ENVOY} -c sample/bootstrap-${XDS}.yaml --drain-time-s 1 -l debug 2> ${ENVOY_LOG})&
ENVOY_PID=$!

function cleanup() {
kill ${ENVOY_PID}
echo Envoy log: ${ENVOY_LOG}
}
trap cleanup EXIT

Expand Down
16 changes: 12 additions & 4 deletions pkg/test/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ func MakeCluster(mode string, clusterName string) *v2.Cluster {
edsSource = &core.ConfigSource{
ConfigSourceSpecifier: &core.ConfigSource_ApiConfigSource{
ApiConfigSource: &core.ApiConfigSource{
ApiType: core.ApiConfigSource_GRPC,
ClusterNames: []string{XdsCluster},
ApiType: core.ApiConfigSource_GRPC,
GrpcServices: []*core.GrpcService{{
TargetSpecifier: &core.GrpcService_EnvoyGrpc_{
EnvoyGrpc: &core.GrpcService_EnvoyGrpc{ClusterName: XdsCluster},
},
}},
},
},
}
Expand Down Expand Up @@ -155,8 +159,12 @@ func MakeHTTPListener(mode string, listenerName string, port uint32, route strin
case Xds:
rdsSource.ConfigSourceSpecifier = &core.ConfigSource_ApiConfigSource{
ApiConfigSource: &core.ApiConfigSource{
ApiType: core.ApiConfigSource_GRPC,
ClusterNames: []string{XdsCluster},
ApiType: core.ApiConfigSource_GRPC,
GrpcServices: []*core.GrpcService{{
TargetSpecifier: &core.GrpcService_EnvoyGrpc_{
EnvoyGrpc: &core.GrpcService_EnvoyGrpc{ClusterName: XdsCluster},
},
}},
},
}
case Rest:
Expand Down
5 changes: 3 additions & 2 deletions sample/bootstrap-ads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ admin:
dynamic_resources:
ads_config:
api_type: GRPC
cluster_names:
- xds_cluster
grpc_services:
- envoy_grpc:
cluster_name: xds_cluster
cds_config:
ads: {}
lds_config:
Expand Down
10 changes: 6 additions & 4 deletions sample/bootstrap-xds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ dynamic_resources:
cds_config:
api_config_source:
api_type: GRPC
cluster_names:
- xds_cluster
grpc_services:
- envoy_grpc:
cluster_name: xds_cluster
lds_config:
api_config_source:
api_type: GRPC
cluster_names:
- xds_cluster
grpc_services:
- envoy_grpc:
cluster_name: xds_cluster
node:
cluster: test-cluster
id: test-id
Expand Down

0 comments on commit 8cef83f

Please sign in to comment.