Skip to content

Commit

Permalink
Update magefile and tests after libbeat update
Browse files Browse the repository at this point in the history
  • Loading branch information
jalvz committed May 12, 2020
1 parent 7c29add commit c0f4767
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
5 changes: 3 additions & 2 deletions beater/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package beater

import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net"
Expand Down Expand Up @@ -406,7 +407,7 @@ func (c *chanClient) Close() error {

// Publish will publish every event in the batch on the channel. Options will be ignored.
// Always returns without error.
func (c *chanClient) Publish(batch pubs.Batch) error {
func (c *chanClient) Publish(_ context.Context, batch pubs.Batch) error {
for _, event := range batch.Events() {
select {
case <-c.done:
Expand All @@ -424,7 +425,7 @@ func (c *chanClient) String() string {
type dummyOutputClient struct {
}

func (d *dummyOutputClient) Publish(batch pubs.Batch) error {
func (d *dummyOutputClient) Publish(_ context.Context, batch pubs.Batch) error {
batch.ACK()
return nil
}
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.0 h1:DMOzIV76tmoDNE9pX6RSN0aDtCYeCg5VueieJaAo1uw=
github.com/stretchr/testify v1.5.0/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
Expand Down
8 changes: 2 additions & 6 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ func Config() error {

func shortConfigFileParams() mage.ConfigFileParams {
return mage.ConfigFileParams{
ShortParts: []string{
mage.OSSBeatDir("_meta/beat.yml"),
},
Short: mage.ConfigParams{Template: mage.OSSBeatDir("_meta/beat.yml")},
ExtraVars: map[string]interface{}{
"elasticsearch_hostport": "localhost:9200",
"listen_hostport": "localhost:" + config.DefaultPort,
Expand All @@ -117,9 +115,7 @@ func shortConfigFileParams() mage.ConfigFileParams {

func dockerConfigFileParams() mage.ConfigFileParams {
return mage.ConfigFileParams{
DockerParts: []string{
mage.OSSBeatDir("_meta/beat.yml"),
},
Docker: mage.ConfigParams{Template: mage.OSSBeatDir("_meta/beat.yml")},
ExtraVars: map[string]interface{}{
"elasticsearch_hostport": "elasticsearch:9200",
"listen_hostport": "0.0.0.0:" + config.DefaultPort,
Expand Down

0 comments on commit c0f4767

Please sign in to comment.