bump: upgrade gopkg.in/yaml.v2 to gopkg.in/yaml.v3

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2022-10-03 05:24:51 +08:00
parent 2a7669f8fa
commit 14ba7cd156
19 changed files with 106 additions and 52 deletions
+2 -2
View File
@@ -178,7 +178,7 @@ func TestReadFile_PassAbsPath(t *testing.T) {
}
func TestToYaml_UnsupportedNestedMapKey(t *testing.T) {
expected := ``
expected := "foo:\n bar: BAR\n"
// nolint: unconvert
vals := Values(map[string]interface{}{
"foo": map[interface{}]interface{}{
@@ -186,8 +186,8 @@ func TestToYaml_UnsupportedNestedMapKey(t *testing.T) {
},
})
actual, err := ToYaml(vals)
require.Error(t, err, "error marshaling into JSON: json: unsupported type: map[interface {}]interface {}")
require.Equal(t, expected, actual)
require.NoError(t, err, "expected nil, but got: %v, when type: map[interface {}]interface {}", err)
}
func TestToYaml(t *testing.T) {