Skip to content

Commit

Permalink
Decode yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jveski committed Nov 20, 2023
1 parent c33cb2c commit 74b0b42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/yaml"
"k8s.io/client-go/discovery"
"k8s.io/client-go/rest"
ctrl "sigs.k8s.io/controller-runtime"
Expand Down Expand Up @@ -147,7 +148,7 @@ func NewManager(t *testing.T) *Manager {
require.NoError(t, err)

res := &unstructured.Unstructured{}
require.NoError(t, res.UnmarshalJSON(raw))
require.NoError(t, yaml.Unmarshal(raw, res))

cli, err := client.New(m.DownstreamRestConfig, client.Options{})
require.NoError(t, err)
Expand Down

0 comments on commit 74b0b42

Please sign in to comment.