Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Jul 3, 2024
1 parent 503f86d commit 75f0f39
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 18 deletions.
5 changes: 0 additions & 5 deletions agent/workers/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"

"github.com/davecgh/go-spew/spew"
"github.com/kubeshop/tracetest/agent/telemetry"

"github.com/kubeshop/tracetest/agent/client"
Expand Down Expand Up @@ -161,10 +160,8 @@ func (w *TriggerWorker) Trigger(ctx context.Context, request *proto.TriggerReque
func (w *TriggerWorker) trigger(ctx context.Context, triggerRequest *proto.TriggerRequest) error {
triggerConfig := convertProtoToTrigger(triggerRequest.Trigger)
w.logger.Debug("Triggering test", zap.Any("triggerConfig", triggerConfig))
spew.Dump(triggerConfig.Type)
triggerer, err := w.registry.Get(triggerConfig.Type)
if err != nil {
spew.Dump(err)
w.logger.Error("Could not get triggerer", zap.Error(err))
return err
}
Expand Down Expand Up @@ -210,8 +207,6 @@ func (w *TriggerWorker) trigger(ctx context.Context, triggerRequest *proto.Trigg
}

func convertProtoToTrigger(pt *proto.Trigger) trigger.Trigger {
spew.Dump(pt)

return trigger.Trigger{
Type: trigger.TriggerType(pt.Type),
HTTP: convertProtoHttpTriggerToHttpTrigger(pt.Http),
Expand Down
3 changes: 0 additions & 3 deletions agent/workers/trigger/playwrightengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"os"
"os/exec"
"path/filepath"

"github.com/davecgh/go-spew/spew"
)

var (
Expand All @@ -25,7 +23,6 @@ func PLAYWRIGHTENGINE() Triggerer {
type playwrightTriggerer struct{}

func (te *playwrightTriggerer) Trigger(ctx context.Context, triggerConfig Trigger, opts *Options) (Response, error) {
spew.Dump(triggerConfig, opts)
response := Response{
Result: TriggerResult{
Type: te.Type(),
Expand Down
1 change: 0 additions & 1 deletion cli/cmd/resource_run_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ func runMultipleFiles(ctx context.Context) (string, error) {
}

exitCode, err := cloudCmd.RunMultipleFiles(ctx, httpClient, runParams, &cliConfig, runnerRegistry, output)
fmt.Println("exitCode", exitCode, err)
ExitCLI(exitCode)
return "", err
}
Expand Down
16 changes: 8 additions & 8 deletions cli/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ func (c Config) UI() string {
}

func (c Config) Path() string {
// pathPrefix := "/api"
// if c.ServerPath != "" {
// pathPrefix = c.ServerPath
// }
pathPrefix := "/api"
if c.ServerPath != "" {
pathPrefix = c.ServerPath
}

// if pathPrefix == "/" {
// return ""
// }
if pathPrefix == "/" {
return ""
}

return ""
return pathPrefix
}

func (c Config) IsEmpty() bool {
Expand Down
2 changes: 1 addition & 1 deletion cli/pkg/oauth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (s *OAuthServer) GetAuthJWT() error {
return fmt.Errorf("failed to start oauth server: %w", err)
}

loginUrl := fmt.Sprintf("%s/oauth?callback=%s", s.frontendEndpoint, url)
loginUrl := fmt.Sprintf("%soauth?callback=%s", s.frontendEndpoint, url)

ui := ui.DefaultUI
err = ui.OpenBrowser(loginUrl)
Expand Down

0 comments on commit 75f0f39

Please sign in to comment.