Skip to content

Commit

Permalink
make lint
Browse files Browse the repository at this point in the history
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
  • Loading branch information
cicoyle committed May 29, 2024
1 parent 4ed185a commit 627914b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
6 changes: 3 additions & 3 deletions tests/integration/framework/process/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func New(t *testing.T, fopts ...Option) *Scheduler {
"--tls-enabled=true",
"--sentry-address="+opts.sentry.Address(),
"--trust-anchors-file="+taFile,
"--trust-domain="+opts.sentry.TrustDomain(),
"--trust-domain="+opts.sentry.TrustDomain(t),
)
}

Expand Down Expand Up @@ -232,8 +232,8 @@ func (s *Scheduler) ClientMTLS(t *testing.T, ctx context.Context, appID string)

sec, err := security.New(ctx, security.Options{
SentryAddress: "localhost:" + strconv.Itoa(s.sentry.Port()),
ControlPlaneTrustDomain: s.sentry.TrustDomain(),
ControlPlaneNamespace: s.sentry.Namespace(),
ControlPlaneTrustDomain: s.sentry.TrustDomain(t),
ControlPlaneNamespace: s.namespace,
TrustAnchorsFile: ptr.Of(s.sentry.TrustAnchorsFile(t)),
AppID: appID,
Mode: modes.StandaloneMode,
Expand Down
14 changes: 2 additions & 12 deletions tests/integration/framework/process/sentry/sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ type Sentry struct {
healthzPort int
metricsPort int
trustDomain *string
namespace string
}

func New(t *testing.T, fopts ...Option) *Sentry {
Expand Down Expand Up @@ -131,10 +130,8 @@ func New(t *testing.T, fopts ...Option) *Sentry {
args = append(args, "-config="+configPath)
}

ns := "default"
if opts.namespace != nil {
opts.execOpts = append(opts.execOpts, exec.WithEnvVars(t, "NAMESPACE", *opts.namespace))
ns = *opts.namespace
}

return &Sentry{
Expand All @@ -145,7 +142,6 @@ func New(t *testing.T, fopts ...Option) *Sentry {
metricsPort: opts.metricsPort,
healthzPort: opts.healthzPort,
trustDomain: opts.trustDomain,
namespace: ns,
}
}

Expand Down Expand Up @@ -200,14 +196,8 @@ func (s *Sentry) HealthzPort() int {
return s.healthzPort
}

func (s *Sentry) Namespace() string {
return s.namespace
}

func (s *Sentry) TrustDomain() string {
if s.trustDomain == nil {
return "localhost"
}
func (s *Sentry) TrustDomain(t *testing.T) string {
require.NotNil(t, s.trustDomain)
return *s.trustDomain
}

Expand Down

0 comments on commit 627914b

Please sign in to comment.