diff --git a/cmd/test.go b/cmd/test.go index 7724575ee..8acd80c11 100755 --- a/cmd/test.go +++ b/cmd/test.go @@ -381,7 +381,7 @@ func (t *Test) GetCmd() *cobra.Command { if coverage { g := graph.NewGraph(t.logger) - g.Serve(path, proxyPort, testReportPath, delay, pid, port, lang, ports, apiTimeout, appCmd, enableTele) + g.Serve(path, proxyPort, mongoPassword, testReportPath, delay, pid, port, lang, ports, apiTimeout, appCmd, enableTele) } else { t.tester.Test(path, testReportPath, appCmd, test.TestOptions{ Tests: tests, diff --git a/go.mod b/go.mod index 7942a603a..dc46f500e 100755 --- a/go.mod +++ b/go.mod @@ -74,9 +74,8 @@ require ( github.com/99designs/gqlgen v0.17.36 github.com/TheZeroSlave/zapsentry v1.18.0 github.com/agnivade/levenshtein v1.1.1 + github.com/emirpasic/gods v1.18.1 github.com/getsentry/sentry-go v0.17.0 - github.com/google/uuid v1.5.0 - github.com/hashicorp/go-memdb v1.3.4 github.com/jackc/pgproto3/v2 v2.3.2 github.com/vektah/gqlparser/v2 v2.5.8 github.com/xdg-go/pbkdf2 v1.0.0 @@ -86,10 +85,7 @@ require ( require ( github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect - github.com/emirpasic/gods v1.18.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/hashicorp/go-immutable-radix v1.3.0 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/golang-lru/v2 v2.0.3 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect diff --git a/go.sum b/go.sum index 4cff5e10b..dced455fb 100755 --- a/go.sum +++ b/go.sum @@ -70,19 +70,8 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hashicorp/go-immutable-radix v1.3.0 h1:8exGP7ego3OmkfksihtSouGMZ+hQrhxx+FVELeXpVPE= -github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-memdb v1.3.4 h1:XSL3NR682X/cVk2IeV0d70N4DZ9ljI885xAEU8IoK3c= -github.com/hashicorp/go-memdb v1.3.4/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg= -github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru/v2 v2.0.3 h1:kmRrRLlInXvng0SmLxmQpQkpbYAvcXm7NPDrgxJa9mE= github.com/hashicorp/golang-lru/v2 v2.0.3/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= diff --git a/pkg/graph/serve.go b/pkg/graph/serve.go index 4245cb2f1..fa3cb4e1b 100644 --- a/pkg/graph/serve.go +++ b/pkg/graph/serve.go @@ -40,7 +40,7 @@ func NewGraph(logger *zap.Logger) graphInterface { const defaultPort = 6789 // Serve is called by the serve command and is used to run a graphql server, to run tests separately via apis. -func (g *graph) Serve(path string, proxyPort uint32, testReportPath string, Delay uint64, pid, port uint32, lang string, passThroughPorts []uint, apiTimeout uint64, appCmd string, enableTele bool) { +func (g *graph) Serve(path string, proxyPort uint32, mongopassword, testReportPath string, Delay uint64, pid, port uint32, lang string, passThroughPorts []uint, apiTimeout uint64, appCmd string, enableTele bool) { var ps *proxy.ProxySet if port == 0 { @@ -93,7 +93,7 @@ func (g *graph) Serve(path string, proxyPort uint32, testReportPath string, Dela return default: // start the proxy - ps = proxy.BootProxy(g.logger, proxy.Option{Port: proxyPort}, "", "", pid, lang, passThroughPorts, loadedHooks, ctx, 0) + ps = proxy.BootProxy(g.logger, proxy.Option{Port: proxyPort, MongoPassword: mongopassword}, "", "", pid, lang, passThroughPorts, loadedHooks, ctx, 0) } diff --git a/pkg/graph/service.go b/pkg/graph/service.go index ebdf2e234..b12cfb816 100644 --- a/pkg/graph/service.go +++ b/pkg/graph/service.go @@ -5,6 +5,6 @@ import ( ) type graphInterface interface { - Serve(path string, proxyPort uint32, testReportPath string, Delay uint64, pid, port uint32, lang string, passThroughPorts []uint, apiTimeout uint64, appCmd string, enableTele bool) - stopGraphqlServer(http *http.Server) + Serve(path string, proxyPort uint32, mongoPassword, testReportPath string, Delay uint64, pid, port uint32, lang string, passThroughPorts []uint, apiTimeout uint64, appCmd string, enableTele bool) + stopGraphqlServer(http *http.Server) } \ No newline at end of file