Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
internal/testrunner/runners/pipeline: test options.API early
  • Loading branch information
efd6 committed Sep 16, 2025
commit 2831d7c18249ce505b8426fc28622d8e31416be9
8 changes: 4 additions & 4 deletions internal/testrunner/runners/pipeline/tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ type PipelineTesterOptions struct {
}

func NewPipelineTester(options PipelineTesterOptions) (*tester, error) {
if options.API == nil {
return nil, errors.New("missing Elasticsearch client")
}

r := tester{
profile: options.Profile,
packageRootPath: options.PackageRootPath,
Expand Down Expand Up @@ -104,10 +108,6 @@ func NewPipelineTester(options PipelineTesterOptions) (*tester, error) {
}
}

if r.esAPI == nil {
return nil, errors.New("missing Elasticsearch client")
}

return &r, nil
}

Expand Down