Skip to content

Commit

Permalink
use talos encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
msanft committed Oct 16, 2023
1 parent b9bfa61 commit d0de973
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/internal/state/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ go_test(
deps = [
"//internal/constants",
"//internal/file",
"@com_github_siderolabs_talos_pkg_machinery//config/encoder",
"@com_github_spf13_afero//:afero",
"@com_github_stretchr_testify//assert",
"@in_gopkg_yaml_v3//:yaml_v3",
],
)
4 changes: 2 additions & 2 deletions cli/internal/state/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (

"github.com/edgelesssys/constellation/v2/internal/constants"
"github.com/edgelesssys/constellation/v2/internal/file"
"github.com/siderolabs/talos/pkg/machinery/config/encoder"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v3"
)

var defaultState = &State{
Expand Down Expand Up @@ -145,7 +145,7 @@ func TestReadFromFile(t *testing.T) {

func mustMarshalYaml(t *testing.T, v any) []byte {
t.Helper()
b, err := yaml.Marshal(v)
b, err := encoder.NewEncoder(v).Encode()
if err != nil {
t.Fatalf("failed to marshal yaml: %v", err)
}
Expand Down

0 comments on commit d0de973

Please sign in to comment.