Skip to content

Commit

Permalink
fix(cli): Adding proper UI url after test/test-suite execution (#3208)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar authored Oct 3, 2023
1 parent 99fef48 commit f9f7618
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 30 deletions.
4 changes: 2 additions & 2 deletions cli/cmd/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ var (
testSuiteRunner = runner.TestSuiteRunner(
testSuiteClient,
openapiClient,
formatters.TestSuiteRun(func() string { return cliConfig.URL() }, true),
formatters.TestSuiteRun(func() string { return cliConfig.UI() }, true),
)

runnerRegistry = runner.NewRegistry(cliLogger).
Register(runner.TestRunner(
testClient,
openapiClient,
formatters.TestRun(func() string { return cliConfig.URL() }, true),
formatters.TestRun(func() string { return cliConfig.UI() }, true),
)).
Register(testSuiteRunner).
RegisterProxy("transaction", testSuiteRunner.Name())
Expand Down
8 changes: 8 additions & 0 deletions cli/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ func (c Config) URL() string {
return fmt.Sprintf("%s://%s", c.Scheme, strings.TrimSuffix(c.Endpoint, "/"))
}

func (c Config) UI() string {
if c.UIEndpoint != "" {
return fmt.Sprintf("%s/organizations/%s/environments/%s", strings.TrimSuffix(c.UIEndpoint, "/"), c.OrganizationID, c.EnvironmentID)
}

return c.URL()
}

func (c Config) Path() string {
pathPrefix := "/api"
if c.ServerPath != nil {
Expand Down
29 changes: 1 addition & 28 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1155,44 +1155,16 @@ go.etcd.io/etcd/server/v3 v3.5.0 h1:jk8D/lwGEDlQU9kZXUFMSANkE22Sg5+mW27ip8xcF9E=
go.mongodb.org/mongo-driver v1.9.0 h1:f3aLGJvQmBl8d9S40IL+jEyBC6hfLPbJjv9t5hEM9ck=
go.mongodb.org/mongo-driver v1.9.0/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 h1:A/5uWzF44DlIgdm/PQFwfMkW0JX+cIcQi/SwLAmZP5M=
go.opentelemetry.io/collector/component v0.80.0 h1:yL+YJDnsAYF8Yviu4MceqNfQN16PDi8hIMUEllxNBlA=
go.opentelemetry.io/collector/component v0.80.0/go.mod h1:4BMtyTmTmw7u3GCibdI+DY8S3q+Hk3W6CLTOk+WHoGU=
go.opentelemetry.io/collector/config/configauth v0.80.0 h1:+8zH36zhLNp/efwxoJwdp1ORIV/RkjoTp9I3OOzvpOE=
go.opentelemetry.io/collector/config/configauth v0.80.0/go.mod h1:F0W34vz4zbqFhxJjvpwDKIaKE2t1baGuhEqreTQJTI0=
go.opentelemetry.io/collector/config/configcompression v0.80.0 h1:lmSOh1Y+tYK/Nzr6ge7V3Oe2csxj3/Q/cUFuEvEQ2kU=
go.opentelemetry.io/collector/config/configcompression v0.80.0/go.mod h1:xhHm1sEH7BTECAJo1xn64NMxeIvZGKdVGdSKUUc+YuM=
go.opentelemetry.io/collector/config/confignet v0.80.0 h1:ouYD6fPs2DCVmqE4h6XpaSyZi9D/Q2j3oSjjPCVSoeo=
go.opentelemetry.io/collector/config/confignet v0.80.0/go.mod h1:unOg7BZvpt6T5xsf+LyeOQvUhD8ld/2AbfOsmUZ/bPM=
go.opentelemetry.io/collector/config/configopaque v0.80.0 h1:+Jwkd/X9jtbj3PkFk+p6H3GdD/qEREOJ47L+hs12ckw=
go.opentelemetry.io/collector/config/configopaque v0.80.0/go.mod h1:pM1oy6gasukw3H6jAvc9Q9OtFaaY2IbfeuwCPAjOgXc=
go.opentelemetry.io/collector/config/configtelemetry v0.80.0 h1:IE/uyLy/roZAnj+jxiYY1QGjP1VYzzen7e1k6bVDBoA=
go.opentelemetry.io/collector/config/configtelemetry v0.80.0/go.mod h1:KEYQRiYJdx38iZkvcLKBZWH9fK4NeafxBwGRrRKMgyA=
go.opentelemetry.io/collector/config/configtls v0.80.0 h1:0NwckEIIzXv2Zz+rLswHb37jsDmMnqo2O4/Fl/+2KFM=
go.opentelemetry.io/collector/config/configtls v0.80.0/go.mod h1:fO1VgdtrcgcVA3Y2vB/YQvTh2tNNFW0R0NjWrtvjTOQ=
go.opentelemetry.io/collector/config/internal v0.80.0 h1:9mOlmdHiaNKS5HTVJ1+COx/URDjzX0zvUKcbsLC6S8k=
go.opentelemetry.io/collector/config/internal v0.80.0/go.mod h1:RKcLV1gQxhgwx+6rlPYsvGMq1RZNne3UeOUZkHxJnIg=
go.opentelemetry.io/collector/confmap v0.80.0 h1:OJapAGOdvyUiovMH5yL860s3ULo9eC21hP/Jl2FXbK0=
go.opentelemetry.io/collector/confmap v0.80.0/go.mod h1:L2d3LUsKYxAAORcpuXjW/Pln95vmw5p6lWDf6Pr/fUg=
go.opentelemetry.io/collector/connector v0.80.0/go.mod h1:Eg46LNt0UHiNB3H80TVYiKmDK+hdrRZsF9aPHMqEReM=
go.opentelemetry.io/collector/connector v0.83.0/go.mod h1:o9xnA7C+2JzYQMSyWIJz/28tc3lGs3JkKLpckpAdzB8=
go.opentelemetry.io/collector/connector v0.86.0/go.mod h1:0n6B8ZyDgT0hvZbJLFYd9y+uAH54wttUGZ6O7Zo1B5M=
go.opentelemetry.io/collector/consumer v0.80.0/go.mod h1://MinWlTMlL44B8WvUzLnYWBKgxfgGE8grpxoUiL9aQ=
go.opentelemetry.io/collector/exporter v0.80.0/go.mod h1:qcvFsxN8AaSxJ60WxSF0zGUTCMhGBWY3Coa9iiONWbg=
go.opentelemetry.io/collector/extension v0.80.0 h1:Nx2QpwBAwcEcCVpqqqJIzpkhniGRhLC5Tr5s+e5H5p0=
go.opentelemetry.io/collector/extension v0.80.0/go.mod h1:r61aYWq9NYZP22+LVqiLOEC0cHGksU+Ys5H+KWT3HgA=
go.opentelemetry.io/collector/extension/auth v0.80.0 h1:BElM8HXYVho2ZikMS8OpQQjmaMizB3qFGJ+kGZ4cyoI=
go.opentelemetry.io/collector/extension/auth v0.80.0/go.mod h1:wDpwb37PxV/aH/kecpPXtJqGSmiOYUyeLuQvRmWciAA=
go.opentelemetry.io/collector/extension/zpagesextension v0.80.0/go.mod h1:rdCO1QK8V0MvU3uxH+kThn5GQUf5jfSUEpV3ijF0JfE=
go.opentelemetry.io/collector/extension/zpagesextension v0.83.0/go.mod h1:oJBN3N0uusy36qMo7FeWCUv2F9S6JCYw1omvtMtUQ4o=
go.opentelemetry.io/collector/featuregate v1.0.0-rcv0013/go.mod h1:0mE3mDLmUrOXVoNsuvj+7dV14h/9HFl/Fy9YTLoLObo=
go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014/go.mod h1:0mE3mDLmUrOXVoNsuvj+7dV14h/9HFl/Fy9YTLoLObo=
go.opentelemetry.io/collector/pdata v1.0.0-rcv0013/go.mod h1:x09G/4KjEcDKNuWCjC5ZtnuDE0XEqiRwI+yrHSVjIy8=
go.opentelemetry.io/collector/pdata v1.0.0-rcv0014/go.mod h1:BRvDrx43kiSoUx3mr7SoA7h9B8+OY99mUK+CZSQFWW4=
go.opentelemetry.io/collector/processor v0.80.0/go.mod h1:ZFtJUIgpJmgkSnBGd4F+q4zb1TrhrQsNHGdDmijYlU8=
go.opentelemetry.io/collector/receiver v0.80.0/go.mod h1:DsyjwQZjlcbwoY4Kq4yx1tNL8Z4d8E7e4tbQYzBUw/g=
go.opentelemetry.io/collector/semconv v0.60.0/go.mod h1:aRkHuJ/OshtDFYluKEtnG5nkKTsy1HZuvZVHmakx+Vo=
go.opentelemetry.io/collector/semconv v0.80.0 h1:tngEIKYoQWfgp7V3NFqAQp2Hs1/3hTXSCK1GBegZHgs=
go.opentelemetry.io/collector/semconv v0.80.0/go.mod h1:TlYPtzvsXyHOgr5eATi43qEMqwSmIziivJB2uctKswo=
go.opentelemetry.io/collector/semconv v0.86.0 h1:bLlPe/JYNjQHo744cqi7iIEybuLv+M5DntUwQPTrvZo=
go.opentelemetry.io/collector/semconv v0.86.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw=
go.opentelemetry.io/collector/service v0.86.0/go.mod h1:IT8MQbc9GWreG+GCuuG7DcQ72HUfV4a9iZXmwyPs27Q=
Expand Down Expand Up @@ -1300,6 +1272,7 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
Expand Down

0 comments on commit f9f7618

Please sign in to comment.