This is an automated email from the ASF dual-hosted git repository. houshengbo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-wskdeploy.git
The following commit(s) were added to refs/heads/master by this push: new c6b0aeb lossen line # checks on go yaml parser as it keeps changing. (#677) c6b0aeb is described below commit c6b0aeb478bd0dd63d6088b178c224070c8da731 Author: Matt Rutkowski <mrutk...@us.ibm.com> AuthorDate: Tue Jan 2 12:09:57 2018 -0600 lossen line # checks on go yaml parser as it keeps changing. (#677) * lossen line # checks on go yaml parser as it keeps changing. * lossen line # checks on go yaml parser as it keeps changing. --- parsers/deploy_parser_test.go | 4 ++-- parsers/manifest_parser_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/parsers/deploy_parser_test.go b/parsers/deploy_parser_test.go index 7d0bfae..1146a9c 100644 --- a/parsers/deploy_parser_test.go +++ b/parsers/deploy_parser_test.go @@ -54,8 +54,8 @@ func TestInvalidKeyDeploymentYaml(t *testing.T) { p := NewYAMLParser() _, err = p.ParseDeployment(tmpfile.Name()) assert.NotNil(t, err) - // go-yaml/yaml prints the wrong line number for mapping values. It should be 3. - assert.Contains(t, err.Error(), "line 2: field invalidKey not found in struct parsers.Project") + // NOTE: go-yaml/yaml gets the line # wrong; testing only for the invalid key message + assert.Contains(t, err.Error(), "field invalidKey not found in struct parsers.Project") } func TestMappingValueDeploymentYaml(t *testing.T) { diff --git a/parsers/manifest_parser_test.go b/parsers/manifest_parser_test.go index 9731630..7ec496a 100644 --- a/parsers/manifest_parser_test.go +++ b/parsers/manifest_parser_test.go @@ -1400,8 +1400,8 @@ func TestBadYAMLInvalidPackageKeyInManifest(t *testing.T) { _, err := p.ParseManifest("../tests/dat/manifest_bad_yaml_invalid_package_key.yaml") assert.NotNil(t, err) - // go-yaml/yaml prints the wrong line number for mapping values. It should be 4. - assert.Contains(t, err.Error(), "line 2: field invalidKey not found in struct parsers.Package") + // NOTE: go-yaml/yaml gets the line # wrong; testing only for the invalid key message + assert.Contains(t, err.Error(), "field invalidKey not found in struct parsers.Package") } func TestBadYAMLInvalidKeyMappingValueInManifest(t *testing.T) { -- To stop receiving notification emails like this one, please contact ['"commits@openwhisk.apache.org" <commits@openwhisk.apache.org>'].