Skip to content

Commit

Permalink
Moving SeedFlag var to correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Apr 16, 2020
1 parent d384b7c commit ad33238
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions libbeat/publisher/pipeline/output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package pipeline

import (
"flag"
"math"
"sync"
"testing"
Expand All @@ -32,10 +31,6 @@ import (
"github.com/elastic/beats/v7/libbeat/publisher"
)

var (
SeedFlag = flag.Int64("seed", 0, "Randomization seed")
)

func TestMakeClientWorker(t *testing.T) {
tests := map[string]func(mockPublishFn) outputs.Client{
"client": newMockClient,
Expand Down
5 changes: 5 additions & 0 deletions libbeat/publisher/pipeline/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package pipeline

import (
"flag"
"math/rand"
"testing"
"time"
Expand All @@ -28,6 +29,10 @@ import (
"github.com/elastic/beats/v7/libbeat/publisher/queue"
)

var (
SeedFlag = flag.Int64("seed", 0, "Randomization seed")
)

type mockPublishFn func(publisher.Batch) error

func newMockClient(publishFn mockPublishFn) outputs.Client {
Expand Down

0 comments on commit ad33238

Please sign in to comment.