Skip to content

Commit

Permalink
Update beats framework to 9718fa246a26
Browse files Browse the repository at this point in the history
Handle libbeat/common/transport moves.

Closes elastic#3416
  • Loading branch information
axw committed Mar 7, 2020
1 parent 7c20a1a commit b3f8886
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ Contents of "LICENSE":
--------------------------------------------------------------------
Dependency: github.com/elastic/beats/v7
Version: v7.0.0
Revision: 1fc1cb97090d
Revision: 9718fa246a26
License type (autodetected): Apache-2.0

--------------------------------------------------------------------
Expand Down
15 changes: 7 additions & 8 deletions beater/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (

"github.com/elastic/beats/v7/libbeat/common"
"github.com/elastic/beats/v7/libbeat/common/transport/tlscommon"
"github.com/elastic/beats/v7/libbeat/outputs"

"github.com/elastic/apm-server/elasticsearch"
)
Expand Down Expand Up @@ -122,7 +121,7 @@ func Test_UnpackConfig(t *testing.T) {
SecretToken: "1234random",
TLS: &tlscommon.ServerConfig{
Enabled: &truthy,
Certificate: outputs.CertificateConfig{
Certificate: tlscommon.CertificateConfig{
Certificate: path.Join("../..", "testdata", "tls", "certificate.pem"),
Key: path.Join("../..", "testdata", "tls", "key.pem")},
ClientAuth: 0,
Expand Down Expand Up @@ -176,7 +175,7 @@ func Test_UnpackConfig(t *testing.T) {
TLS: func() *tls.Config {
tlsServerConfig, err := tlscommon.LoadTLSServerConfig(&tlscommon.ServerConfig{
Enabled: &truthy,
Certificate: outputs.CertificateConfig{
Certificate: tlscommon.CertificateConfig{
Certificate: path.Join("../..", "testdata", "tls", "certificate.pem"),
Key: path.Join("../..", "testdata", "tls", "key.pem")},
ClientAuth: 0,
Expand Down Expand Up @@ -242,7 +241,7 @@ func Test_UnpackConfig(t *testing.T) {
SecretToken: "1234random",
TLS: &tlscommon.ServerConfig{
Enabled: &truthy,
Certificate: outputs.CertificateConfig{Certificate: "", Key: ""},
Certificate: tlscommon.CertificateConfig{Certificate: "", Key: ""},
ClientAuth: 3},
AugmentEnabled: true,
Expvar: &ExpvarConfig{
Expand Down Expand Up @@ -286,7 +285,7 @@ func Test_UnpackConfig(t *testing.T) {
TLS: func() *tls.Config {
tlsServerConfig, err := tlscommon.LoadTLSServerConfig(&tlscommon.ServerConfig{
Enabled: &truthy,
Certificate: outputs.CertificateConfig{Certificate: "", Key: ""},
Certificate: tlscommon.CertificateConfig{Certificate: "", Key: ""},
ClientAuth: 3})
require.NoError(t, err)
return tlsServerConfig.BuildModuleConfig("localhost:14250")
Expand Down Expand Up @@ -440,9 +439,9 @@ func TestTLSSettings(t *testing.T) {
}{
"NoConfig": {tlsServerCfg: nil, expected: false},
"SSL": {tlsServerCfg: &tlscommon.ServerConfig{Enabled: nil}, expected: true},
"WithCert": {tlsServerCfg: &tlscommon.ServerConfig{Certificate: outputs.CertificateConfig{Certificate: "Cert"}}, expected: true},
"WithCertAndKey": {tlsServerCfg: &tlscommon.ServerConfig{Certificate: outputs.CertificateConfig{Certificate: "Cert", Key: "key"}}, expected: true},
"ConfiguredToFalse": {tlsServerCfg: &tlscommon.ServerConfig{Certificate: outputs.CertificateConfig{Certificate: "Cert", Key: "key"}, Enabled: &falsy}, expected: false},
"WithCert": {tlsServerCfg: &tlscommon.ServerConfig{Certificate: tlscommon.CertificateConfig{Certificate: "Cert"}}, expected: true},
"WithCertAndKey": {tlsServerCfg: &tlscommon.ServerConfig{Certificate: tlscommon.CertificateConfig{Certificate: "Cert", Key: "key"}}, expected: true},
"ConfiguredToFalse": {tlsServerCfg: &tlscommon.ServerConfig{Certificate: tlscommon.CertificateConfig{Certificate: "Cert", Key: "key"}, Enabled: &falsy}, expected: false},
"ConfiguredToTrue": {tlsServerCfg: &tlscommon.ServerConfig{Enabled: &truthy}, expected: true},
} {
t.Run(name, func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"github.com/pkg/errors"

"github.com/elastic/beats/v7/libbeat/common"
"github.com/elastic/beats/v7/libbeat/common/transport"
"github.com/elastic/beats/v7/libbeat/common/transport/tlscommon"
"github.com/elastic/beats/v7/libbeat/outputs/transport"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/dop251/goja v0.0.0-20200302213548-ebfbf88ae3f7 // indirect
github.com/dop251/goja_nodejs v0.0.0-20200128125109-2d688c7e0ac4 // indirect
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20200304020317-1fc1cb97090d
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20200305204646-9718fa246a26
github.com/elastic/go-elasticsearch/v7 v7.5.0
github.com/elastic/go-elasticsearch/v8 v8.0.0-20200210103600-aff00e5adfde
github.com/elastic/go-licenser v0.2.1
Expand Down Expand Up @@ -57,7 +57,7 @@ require (
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
golang.org/x/tools v0.0.0-20200303225724-c5a141475315 // indirect
golang.org/x/tools v0.0.0-20200305224536-de023d59a5d1 // indirect
google.golang.org/grpc v1.27.1
gopkg.in/yaml.v2 v2.2.8
howett.net/plist v0.0.0-20200225050739-77e249a2e2ba // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ github.com/elastic/beats/v7 v7.0.0-20200303081116-cdadced5d517 h1:yjGYQjpqgYzVeU
github.com/elastic/beats/v7 v7.0.0-20200303081116-cdadced5d517/go.mod h1:5umFFi6KGcItk/YlvuvNZ9P6mnrQ4nMvbqK8ebUTHFc=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20200304020317-1fc1cb97090d h1:zHotENiqyiNsQFqUWU/rlytnx+37YzVHhLJXzjols+M=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20200304020317-1fc1cb97090d/go.mod h1:5umFFi6KGcItk/YlvuvNZ9P6mnrQ4nMvbqK8ebUTHFc=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20200305204646-9718fa246a26 h1:5eBqAzQv4n0uYWnKT3QCzLZMltHtetGVPhVkDj9wuwc=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20200305204646-9718fa246a26/go.mod h1:gqyHy9MhZDNKUQQzYW3FA20TkU8GOQZVZnDOZcPhD+w=
github.com/elastic/ecs v1.4.0 h1:BGIUwWJhThRO2IQxzm7ekV9TMUGwZoYyevT5/1xmMf0=
github.com/elastic/ecs v1.4.0/go.mod h1:pgiLbQsijLOJvFR8OTILLu0Ni/R/foUNg0L+T6mU9b4=
github.com/elastic/fsevents v0.0.0-20181029231046-e1d381a4d270/go.mod h1:Msl1pdboCbArMF/nSCDUXgQuWTeoMmE/z8607X+k7ng=
Expand Down Expand Up @@ -1168,6 +1170,8 @@ golang.org/x/tools v0.0.0-20200302225559-9b52d559c609 h1:3/QY44rOqJoMLCsQz9bAgIn
golang.org/x/tools v0.0.0-20200302225559-9b52d559c609/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200303225724-c5a141475315 h1:jrsCSJf5IvTN6gQom0Li545p3vfFph8bzsPvSGM56wM=
golang.org/x/tools v0.0.0-20200303225724-c5a141475315/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200305224536-de023d59a5d1 h1:A6Mu2vcvuNXbBiGKuVHG74fmEPmzsZ5dzG0WhV2GcqI=
golang.org/x/tools v0.0.0-20200305224536-de023d59a5d1/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
Expand Down

0 comments on commit b3f8886

Please sign in to comment.