Skip to content

Commit f9403ce

Browse files
authored
Upgrade go-ucfg to version 0.8.2 (elastic#16199)
* 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.
1 parent 96c60d0 commit f9403ce

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
@@ -1391,8 +1391,8 @@ Apache License 2.0
13911391

13921392
--------------------------------------------------------------------
13931393
Dependency: github.com/elastic/go-ucfg
1394-
Version: v0.8.1
1395-
Revision: 093a6898c440d2e5e93abf09850068c60428b2cd
1394+
Version: v0.8.2
1395+
Revision: ab69586e10820006b250d04c98cc3b848e227808
13961396
License type (autodetected): Apache-2.0
13971397
./vendor/github.com/elastic/go-ucfg/LICENSE:
13981398
--------------------------------------------------------------------

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
@@ -3268,76 +3268,76 @@
32683268
"versionExact": "v0.0.7"
32693269
},
32703270
{
3271-
"checksumSHA1": "a1x0prr3ix+QFOdJpNfM3Q4G6Es=",
3271+
"checksumSHA1": "VPcK6uPDligSrbdi1yVeGivPvno=",
32723272
"path": "github.com/elastic/go-ucfg",
3273-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3274-
"revisionTime": "2020-01-31T13:55:22Z",
3275-
"version": "v0.8.1",
3276-
"versionExact": "v0.8.1"
3273+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3274+
"revisionTime": "2020-02-07T21:56:35Z",
3275+
"version": "v0.8.2",
3276+
"versionExact": "v0.8.2"
32773277
},
32783278
{
32793279
"checksumSHA1": "X+R/CD8SokJrmlxFTx2nSevRDhQ=",
32803280
"path": "github.com/elastic/go-ucfg/cfgutil",
3281-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3282-
"revisionTime": "2020-01-31T13:55:22Z",
3283-
"version": "v0.8.1",
3284-
"versionExact": "v0.8.1"
3281+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3282+
"revisionTime": "2020-02-07T21:56:35Z",
3283+
"version": "v0.8.2",
3284+
"versionExact": "v0.8.2"
32853285
},
32863286
{
32873287
"checksumSHA1": "B58nBBiUIstpkXfr9yaYN9GzdLE=",
32883288
"path": "github.com/elastic/go-ucfg/diff",
3289-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3290-
"revisionTime": "2020-01-31T13:55:22Z",
3291-
"version": "v0.8.1",
3292-
"versionExact": "v0.8.1"
3289+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3290+
"revisionTime": "2020-02-07T21:56:35Z",
3291+
"version": "v0.8.2",
3292+
"versionExact": "v0.8.2"
32933293
},
32943294
{
32953295
"checksumSHA1": "E6k6DWkpI+LOKDIFRqRmNH9GORc=",
32963296
"path": "github.com/elastic/go-ucfg/flag",
3297-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3298-
"revisionTime": "2020-01-31T13:55:22Z",
3299-
"version": "v0.8.1",
3300-
"versionExact": "v0.8.1"
3297+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3298+
"revisionTime": "2020-02-07T21:56:35Z",
3299+
"version": "v0.8.2",
3300+
"versionExact": "v0.8.2"
33013301
},
33023302
{
33033303
"checksumSHA1": "NhiQQjYMs/ViCbmEq9tll2uCaYo=",
33043304
"path": "github.com/elastic/go-ucfg/hjson",
3305-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3306-
"revisionTime": "2020-01-31T13:55:22Z",
3307-
"version": "v0.8.1",
3308-
"versionExact": "v0.8.1"
3305+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3306+
"revisionTime": "2020-02-07T21:56:35Z",
3307+
"version": "v0.8.2",
3308+
"versionExact": "v0.8.2"
33093309
},
33103310
{
33113311
"checksumSHA1": "esXpiQlEvTOUwsE0nNesso8albo=",
33123312
"path": "github.com/elastic/go-ucfg/internal/parse",
33133313
"revision": "0539807037ce820e147797f051ff32b05f4f9288",
33143314
"revisionTime": "2019-01-28T11:18:48Z",
3315-
"version": "v0.8.1",
3316-
"versionExact": "v0.8.1"
3315+
"version": "v0.8.2",
3316+
"versionExact": "v0.8.2"
33173317
},
33183318
{
33193319
"checksumSHA1": "cfMNsyQm0gZOV0hRJrBSdKDQSBo=",
33203320
"path": "github.com/elastic/go-ucfg/json",
3321-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3322-
"revisionTime": "2020-01-31T13:55:22Z",
3323-
"version": "v0.8.1",
3324-
"versionExact": "v0.8.1"
3321+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3322+
"revisionTime": "2020-02-07T21:56:35Z",
3323+
"version": "v0.8.2",
3324+
"versionExact": "v0.8.2"
33253325
},
33263326
{
33273327
"checksumSHA1": "ZISq+zzSb0OLzvwLlf1ObdgnFmM=",
33283328
"path": "github.com/elastic/go-ucfg/parse",
3329-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3330-
"revisionTime": "2020-01-31T13:55:22Z",
3331-
"version": "v0.8.1",
3332-
"versionExact": "v0.8.1"
3329+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3330+
"revisionTime": "2020-02-07T21:56:35Z",
3331+
"version": "v0.8.2",
3332+
"versionExact": "v0.8.2"
33333333
},
33343334
{
33353335
"checksumSHA1": "cnJVnptTvXNLzxVhd266k19/pQg=",
33363336
"path": "github.com/elastic/go-ucfg/yaml",
3337-
"revision": "093a6898c440d2e5e93abf09850068c60428b2cd",
3338-
"revisionTime": "2020-01-31T13:55:22Z",
3339-
"version": "v0.8.1",
3340-
"versionExact": "v0.8.1"
3337+
"revision": "ab69586e10820006b250d04c98cc3b848e227808",
3338+
"revisionTime": "2020-02-07T21:56:35Z",
3339+
"version": "v0.8.2",
3340+
"versionExact": "v0.8.2"
33413341
},
33423342
{
33433343
"checksumSHA1": "iI1JCWsrAPpoKcEo/i6G3lRLIVs=",

0 commit comments

Comments
 (0)