File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ make run
2424
2525# or run it in debug mode
2626GATEWAY_API_CONTROLLER_LOGLEVEL=debug make run
27+
28+ # to run it against specific lattice service endpoint
29+ LATTICE_ENDPOINT=https://mercury-gamma.us-west-2.amazonaws.com/ make run
2730```
2831
2932## End-to-End Testing
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ package services
22
33import (
44 "context"
5+ "github.com/golang/glog"
6+ "os"
57
68 "github.com/aws/aws-sdk-go/aws"
79 "github.com/aws/aws-sdk-go/aws/session"
@@ -30,11 +32,16 @@ const (
3032
3133func NewDefaultLattice (sess * session.Session , region string ) * defaultLattice {
3234 var latticeSess vpclatticeiface.VpcLatticeAPI
33- if region == "us-east-1" {
34- latticeSess = vpclattice . New ( sess , aws . NewConfig (). WithRegion ( "us-east-1" ). WithEndpoint ( "https://mercury-beta.us-east-1.amazonaws.com/" ))
35- } else {
36- latticeSess = vpclattice . New ( sess , aws . NewConfig (). WithRegion ( "us-west-2" ). WithEndpoint ( BetaProdEndpoint ))
35+ endpoint := os . Getenv ( "LATTICE_ENDPOINT" )
36+
37+ if endpoint == "" {
38+ endpoint = BetaProdEndpoint
3739 }
40+
41+ latticeSess = vpclattice .New (sess , aws .NewConfig ().WithRegion ("us-west-2" ).WithEndpoint (endpoint ))
42+
43+ glog .V (2 ).Infoln ("Lattice Service EndPoint:" , endpoint )
44+
3845 return & defaultLattice {VpcLatticeAPI : latticeSess }
3946}
4047
You can’t perform that action at this time.
0 commit comments