Yaml: remove empty-stream workaround in favor of go-yaml fix (#30789)

This commit is contained in:
andig 2026-06-14 11:00:54 +02:00 • committed by GitHub
parent 15aa800e65
commit 8f5983c189
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 15 additions and 36 deletions

View file

@ -15,8 +15,8 @@ func TestYamlFloat(t *testing.T) {
func TestYamlEmpty(t *testing.T) {
var res map[string]any
err := yaml.Unmarshal([]byte(""), &res)
require.ErrorContains(t, err, "no documents in stream")
require.NoError(t, yaml.Unmarshal([]byte(""), &res))
require.Nil(t, res)
}
func TestYamlCommentsOnly(t *testing.T) {
@ -24,8 +24,8 @@ func TestYamlCommentsOnly(t *testing.T) {
# another comment
`
var res map[string]any
err := yaml.Unmarshal([]byte(b), &res)
require.ErrorContains(t, err, "no documents in stream")
require.NoError(t, yaml.Unmarshal([]byte(b), &res))
require.Nil(t, res)
}
func TestYamlError(t *testing.T) {