Skip to content

Commit 733db53

Browse files
authored
Upgrade go-ucfg to version 0.8.2 (#16199) (#16304)
* 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)
1 parent 8b82390 commit 733db53

File tree

10 files changed

+103
-62
lines changed

10 files changed

+103
-62
lines changed

NOTICE.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1518,8 +1518,8 @@ Apache License 2.0
15181518

15191519
--------------------------------------------------------------------
15201520
Dependency: github.com/elastic/go-ucfg
1521-
Version: v0.8.1
1522-
Revision: 093a6898c440d2e5e93abf09850068c60428b2cd
1521+
Version: v0.8.2
1522+
Revision: ab69586e10820006b250d04c98cc3b848e227808
15231523
License type (autodetected): Apache-2.0
15241524
./vendor/github.com/elastic/go-ucfg/LICENSE:
15251525
--------------------------------------------------------------------

filebeat/fileset/modules_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ func TestMcfgFromConfig(t *testing.T) {
347347
Filesets: map[string]*FilesetConfig{
348348
"error": {
349349
Enabled: &falseVar,
350-
Var: map[string]interface{}{},
351-
Input: map[string]interface{}{},
350+
Var: nil,
351+
Input: nil,
352352
},
353353
},
354354
},
@@ -366,7 +366,7 @@ func TestMcfgFromConfig(t *testing.T) {
366366
Var: map[string]interface{}{
367367
"test": false,
368368
},
369-
Input: map[string]interface{}{},
369+
Input: nil,
370370
},
371371
},
372372
},

metricbeat/mb/lightmodules_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -195,22 +195,22 @@ func TestNewModuleFromConfig(t *testing.T) {
195195
"normal module": {
196196
config: common.MapStr{"module": "foo", "metricsets": []string{"bar"}},
197197
expectedOption: "default",
198-
expectedQuery: QueryParams{},
198+
expectedQuery: nil,
199199
},
200200
"light module": {
201201
config: common.MapStr{"module": "service", "metricsets": []string{"metricset"}},
202202
expectedOption: "test",
203-
expectedQuery: QueryParams{},
203+
expectedQuery: nil,
204204
},
205205
"light module default metricset": {
206206
config: common.MapStr{"module": "service"},
207207
expectedOption: "test",
208-
expectedQuery: QueryParams{},
208+
expectedQuery: nil,
209209
},
210210
"light module override option": {
211211
config: common.MapStr{"module": "service", "option": "overriden"},
212212
expectedOption: "overriden",
213-
expectedQuery: QueryParams{},
213+
expectedQuery: nil,
214214
},
215215
"light module with query": {
216216
config: common.MapStr{"module": "service", "query": common.MapStr{"param": "foo"}},
@@ -221,7 +221,7 @@ func TestNewModuleFromConfig(t *testing.T) {
221221
config: common.MapStr{"module": "service", "period": "42s"},
222222
expectedOption: "test",
223223
expectedPeriod: 42 * time.Second,
224-
expectedQuery: QueryParams{},
224+
expectedQuery: nil,
225225
},
226226
"light module is broken": {
227227
config: common.MapStr{"module": "broken"},
@@ -238,7 +238,7 @@ func TestNewModuleFromConfig(t *testing.T) {
238238
"mixed module with standard and light metricsets": {
239239
config: common.MapStr{"module": "mixed", "metricsets": []string{"standard", "light"}},
240240
expectedOption: "default",
241-
expectedQuery: QueryParams{},
241+
expectedQuery: nil,
242242
},
243243
"mixed module with unregistered and light metricsets": {
244244
config: common.MapStr{"module": "mixedbroken", "metricsets": []string{"unregistered", "light"}},

metricbeat/mb/mb_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ func TestModuleConfig(t *testing.T) {
8181
err string
8282
}{
8383
{
84-
name: "missing required field",
84+
name: "string value is not set on required field",
8585
in: map[string]interface{}{},
86-
err: "missing required field accessing 'module'",
86+
err: "string value is not set accessing 'module'",
8787
},
8888
{
8989
name: "valid config",
@@ -97,7 +97,7 @@ func TestModuleConfig(t *testing.T) {
9797
Enabled: true,
9898
Period: time.Second * 10,
9999
Timeout: 0,
100-
Query: QueryParams{},
100+
Query: nil,
101101
},
102102
},
103103
{

metricbeat/module/prometheus/collector/_meta/data.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
"address": "127.0.0.1:55555",
2424
"type": "prometheus"
2525
}
26-
}
26+
}

vendor/github.com/elastic/go-ucfg/CHANGELOG.md

+9-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/elastic/go-ucfg/error.go

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/elastic/go-ucfg/reify.go

+8-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/elastic/go-ucfg/validator.go

+28-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/vendor.json

+35-35
Original file line numberDiff line numberDiff line change
@@ -3285,76 +3285,76 @@
32853285
"versionExact": "v0.0.7"
32863286
},
32873287
{
3288-
"checksumSHA1": "a1x0prr3ix+QFOdJpNfM3Q4G6Es=",
3288+
"checksumSHA1": "VPcK6uPDligSrbdi1yVeGivPvno=",
32893289
"path": "github.com/elastic/go-ucfg",
3290-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3291-
"revisionTime": "2020-01-31T13:55:22Z",
3292-
"version": "v0.8.1",
3293-
"versionExact": "v0.8.1"
3290+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3291+
"revisionTime": "2020-02-07T21:56:35Z",
3292+
"version": "v0.8.2",
3293+
"versionExact": "v0.8.2"
32943294
},
32953295
{
32963296
"checksumSHA1": "X+R/CD8SokJrmlxFTx2nSevRDhQ=",
32973297
"path": "github.com/elastic/go-ucfg/cfgutil",
3298-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3299-
"revisionTime": "2020-01-31T13:55:22Z",
3300-
"version": "v0.8.1",
3301-
"versionExact": "v0.8.1"
3298+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3299+
"revisionTime": "2020-02-07T21:56:35Z",
3300+
"version": "v0.8.2",
3301+
"versionExact": "v0.8.2"
33023302
},
33033303
{
33043304
"checksumSHA1": "B58nBBiUIstpkXfr9yaYN9GzdLE=",
33053305
"path": "github.com/elastic/go-ucfg/diff",
3306-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3307-
"revisionTime": "2020-01-31T13:55:22Z",
3308-
"version": "v0.8.1",
3309-
"versionExact": "v0.8.1"
3306+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3307+
"revisionTime": "2020-02-07T21:56:35Z",
3308+
"version": "v0.8.2",
3309+
"versionExact": "v0.8.2"
33103310
},
33113311
{
33123312
"checksumSHA1": "E6k6DWkpI+LOKDIFRqRmNH9GORc=",
33133313
"path": "github.com/elastic/go-ucfg/flag",
3314-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3315-
"revisionTime": "2020-01-31T13:55:22Z",
3316-
"version": "v0.8.1",
3317-
"versionExact": "v0.8.1"
3314+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3315+
"revisionTime": "2020-02-07T21:56:35Z",
3316+
"version": "v0.8.2",
3317+
"versionExact": "v0.8.2"
33183318
},
33193319
{
33203320
"checksumSHA1": "NhiQQjYMs/ViCbmEq9tll2uCaYo=",
33213321
"path": "github.com/elastic/go-ucfg/hjson",
3322-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3323-
"revisionTime": "2020-01-31T13:55:22Z",
3324-
"version": "v0.8.1",
3325-
"versionExact": "v0.8.1"
3322+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3323+
"revisionTime": "2020-02-07T21:56:35Z",
3324+
"version": "v0.8.2",
3325+
"versionExact": "v0.8.2"
33263326
},
33273327
{
33283328
"checksumSHA1": "esXpiQlEvTOUwsE0nNesso8albo=",
33293329
"path": "github.com/elastic/go-ucfg/internal/parse",
33303330
"revision": "0539807037ce820e147797f051ff32b05f4f9288",
33313331
"revisionTime": "2019-01-28T11:18:48Z",
3332-
"version": "v0.8.1",
3333-
"versionExact": "v0.8.1"
3332+
"version": "v0.8.2",
3333+
"versionExact": "v0.8.2"
33343334
},
33353335
{
33363336
"checksumSHA1": "cfMNsyQm0gZOV0hRJrBSdKDQSBo=",
33373337
"path": "github.com/elastic/go-ucfg/json",
3338-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3339-
"revisionTime": "2020-01-31T13:55:22Z",
3340-
"version": "v0.8.1",
3341-
"versionExact": "v0.8.1"
3338+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3339+
"revisionTime": "2020-02-07T21:56:35Z",
3340+
"version": "v0.8.2",
3341+
"versionExact": "v0.8.2"
33423342
},
33433343
{
33443344
"checksumSHA1": "ZISq+zzSb0OLzvwLlf1ObdgnFmM=",
33453345
"path": "github.com/elastic/go-ucfg/parse",
3346-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3347-
"revisionTime": "2020-01-31T13:55:22Z",
3348-
"version": "v0.8.1",
3349-
"versionExact": "v0.8.1"
3346+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3347+
"revisionTime": "2020-02-07T21:56:35Z",
3348+
"version": "v0.8.2",
3349+
"versionExact": "v0.8.2"
33503350
},
33513351
{
33523352
"checksumSHA1": "cnJVnptTvXNLzxVhd266k19/pQg=",
33533353
"path": "github.com/elastic/go-ucfg/yaml",
3354-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3355-
"revisionTime": "2020-01-31T13:55:22Z",
3356-
"version": "v0.8.1",
3357-
"versionExact": "v0.8.1"
3354+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3355+
"revisionTime": "2020-02-07T21:56:35Z",
3356+
"version": "v0.8.2",
3357+
"versionExact": "v0.8.2"
33583358
},
33593359
{
33603360
"checksumSHA1": "iI1JCWsrAPpoKcEo/i6G3lRLIVs=",

0 commit comments

Comments
 (0)