Skip to content

Commit

Permalink
Upgrade go-ucfg to version 0.8.2 (#16199) (#16304)
Browse files Browse the repository at this point in the history
* Upgrade go-ucfg to master, for testing before 0.8.2 release.

* Update notice.

* Fix tests.

* Update to the v0.8.2 release tag and remake NOTICE.txt.

* Improve test name.

(cherry picked from commit f9403ce)
  • Loading branch information
blakerouse authored Feb 13, 2020
1 parent 8b82390 commit 733db53
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 62 deletions.
4 changes: 2 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1518,8 +1518,8 @@ Apache License 2.0

--------------------------------------------------------------------
Dependency: github.com/elastic/go-ucfg
Version: v0.8.1
Revision: 093a6898c440d2e5e93abf09850068c60428b2cd
Version: v0.8.2
Revision: ab69586e10820006b250d04c98cc3b848e227808
License type (autodetected): Apache-2.0
./vendor/github.com/elastic/go-ucfg/LICENSE:
--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions filebeat/fileset/modules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ func TestMcfgFromConfig(t *testing.T) {
Filesets: map[string]*FilesetConfig{
"error": {
Enabled: &falseVar,
Var: map[string]interface{}{},
Input: map[string]interface{}{},
Var: nil,
Input: nil,
},
},
},
Expand All @@ -366,7 +366,7 @@ func TestMcfgFromConfig(t *testing.T) {
Var: map[string]interface{}{
"test": false,
},
Input: map[string]interface{}{},
Input: nil,
},
},
},
Expand Down
12 changes: 6 additions & 6 deletions metricbeat/mb/lightmodules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,22 +195,22 @@ func TestNewModuleFromConfig(t *testing.T) {
"normal module": {
config: common.MapStr{"module": "foo", "metricsets": []string{"bar"}},
expectedOption: "default",
expectedQuery: QueryParams{},
expectedQuery: nil,
},
"light module": {
config: common.MapStr{"module": "service", "metricsets": []string{"metricset"}},
expectedOption: "test",
expectedQuery: QueryParams{},
expectedQuery: nil,
},
"light module default metricset": {
config: common.MapStr{"module": "service"},
expectedOption: "test",
expectedQuery: QueryParams{},
expectedQuery: nil,
},
"light module override option": {
config: common.MapStr{"module": "service", "option": "overriden"},
expectedOption: "overriden",
expectedQuery: QueryParams{},
expectedQuery: nil,
},
"light module with query": {
config: common.MapStr{"module": "service", "query": common.MapStr{"param": "foo"}},
Expand All @@ -221,7 +221,7 @@ func TestNewModuleFromConfig(t *testing.T) {
config: common.MapStr{"module": "service", "period": "42s"},
expectedOption: "test",
expectedPeriod: 42 * time.Second,
expectedQuery: QueryParams{},
expectedQuery: nil,
},
"light module is broken": {
config: common.MapStr{"module": "broken"},
Expand All @@ -238,7 +238,7 @@ func TestNewModuleFromConfig(t *testing.T) {
"mixed module with standard and light metricsets": {
config: common.MapStr{"module": "mixed", "metricsets": []string{"standard", "light"}},
expectedOption: "default",
expectedQuery: QueryParams{},
expectedQuery: nil,
},
"mixed module with unregistered and light metricsets": {
config: common.MapStr{"module": "mixedbroken", "metricsets": []string{"unregistered", "light"}},
Expand Down
6 changes: 3 additions & 3 deletions metricbeat/mb/mb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ func TestModuleConfig(t *testing.T) {
err string
}{
{
name: "missing required field",
name: "string value is not set on required field",
in: map[string]interface{}{},
err: "missing required field accessing 'module'",
err: "string value is not set accessing 'module'",
},
{
name: "valid config",
Expand All @@ -97,7 +97,7 @@ func TestModuleConfig(t *testing.T) {
Enabled: true,
Period: time.Second * 10,
Timeout: 0,
Query: QueryParams{},
Query: nil,
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/prometheus/collector/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
"address": "127.0.0.1:55555",
"type": "prometheus"
}
}
}
10 changes: 9 additions & 1 deletion vendor/github.com/elastic/go-ucfg/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions vendor/github.com/elastic/go-ucfg/error.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions vendor/github.com/elastic/go-ucfg/reify.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 28 additions & 6 deletions vendor/github.com/elastic/go-ucfg/validator.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 35 additions & 35 deletions vendor/vendor.json
Original file line number Diff line number Diff line change
Expand Up @@ -3285,76 +3285,76 @@
"versionExact": "v0.0.7"
},
{
"checksumSHA1": "a1x0prr3ix+QFOdJpNfM3Q4G6Es=",
"checksumSHA1": "VPcK6uPDligSrbdi1yVeGivPvno=",
"path": "github.com/elastic/go-ucfg",
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
"revisionTime": "2020-01-31T13:55:22Z",
"version": "v0.8.1",
"versionExact": "v0.8.1"
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
"revisionTime": "2020-02-07T21:56:35Z",
"version": "v0.8.2",
"versionExact": "v0.8.2"
},
{
"checksumSHA1": "X+R/CD8SokJrmlxFTx2nSevRDhQ=",
"path": "github.com/elastic/go-ucfg/cfgutil",
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
"revisionTime": "2020-01-31T13:55:22Z",
"version": "v0.8.1",
"versionExact": "v0.8.1"
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
"revisionTime": "2020-02-07T21:56:35Z",
"version": "v0.8.2",
"versionExact": "v0.8.2"
},
{
"checksumSHA1": "B58nBBiUIstpkXfr9yaYN9GzdLE=",
"path": "github.com/elastic/go-ucfg/diff",
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
"revisionTime": "2020-01-31T13:55:22Z",
"version": "v0.8.1",
"versionExact": "v0.8.1"
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
"revisionTime": "2020-02-07T21:56:35Z",
"version": "v0.8.2",
"versionExact": "v0.8.2"
},
{
"checksumSHA1": "E6k6DWkpI+LOKDIFRqRmNH9GORc=",
"path": "github.com/elastic/go-ucfg/flag",
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
"revisionTime": "2020-01-31T13:55:22Z",
"version": "v0.8.1",
"versionExact": "v0.8.1"
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
"revisionTime": "2020-02-07T21:56:35Z",
"version": "v0.8.2",
"versionExact": "v0.8.2"
},
{
"checksumSHA1": "NhiQQjYMs/ViCbmEq9tll2uCaYo=",
"path": "github.com/elastic/go-ucfg/hjson",
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
"revisionTime": "2020-01-31T13:55:22Z",
"version": "v0.8.1",
"versionExact": "v0.8.1"
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
"revisionTime": "2020-02-07T21:56:35Z",
"version": "v0.8.2",
"versionExact": "v0.8.2"
},
{
"checksumSHA1": "esXpiQlEvTOUwsE0nNesso8albo=",
"path": "github.com/elastic/go-ucfg/internal/parse",
"revision": "0539807037ce820e147797f051ff32b05f4f9288",
"revisionTime": "2019-01-28T11:18:48Z",
"version": "v0.8.1",
"versionExact": "v0.8.1"
"version": "v0.8.2",
"versionExact": "v0.8.2"
},
{
"checksumSHA1": "cfMNsyQm0gZOV0hRJrBSdKDQSBo=",
"path": "github.com/elastic/go-ucfg/json",
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
"revisionTime": "2020-01-31T13:55:22Z",
"version": "v0.8.1",
"versionExact": "v0.8.1"
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
"revisionTime": "2020-02-07T21:56:35Z",
"version": "v0.8.2",
"versionExact": "v0.8.2"
},
{
"checksumSHA1": "ZISq+zzSb0OLzvwLlf1ObdgnFmM=",
"path": "github.com/elastic/go-ucfg/parse",
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
"revisionTime": "2020-01-31T13:55:22Z",
"version": "v0.8.1",
"versionExact": "v0.8.1"
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
"revisionTime": "2020-02-07T21:56:35Z",
"version": "v0.8.2",
"versionExact": "v0.8.2"
},
{
"checksumSHA1": "cnJVnptTvXNLzxVhd266k19/pQg=",
"path": "github.com/elastic/go-ucfg/yaml",
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
"revisionTime": "2020-01-31T13:55:22Z",
"version": "v0.8.1",
"versionExact": "v0.8.1"
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
"revisionTime": "2020-02-07T21:56:35Z",
"version": "v0.8.2",
"versionExact": "v0.8.2"
},
{
"checksumSHA1": "iI1JCWsrAPpoKcEo/i6G3lRLIVs=",
Expand Down

0 comments on commit 733db53

Please sign in to comment.