Skip to content

Commit df8d4d6

Browse files
committed
update tests
1 parent d0f5fae commit df8d4d6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

cmd/esc/cli/client/client_test.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,9 @@ func TestCheckYAMLEnvironment(t *testing.T) {
758758
yaml := []byte(`{"values":{"foo":"bar"}}`)
759759

760760
expected := &esc.Environment{
761-
Exprs: map[string]esc.Expr{"foo": {Literal: "bar"}},
761+
Exprs: &esc.Expr{
762+
Object: map[string]esc.Expr{"foo": {Literal: "bar"}},
763+
},
762764
Properties: map[string]esc.Value{"foo": esc.NewValue("bar")},
763765
Schema: schema.Record(schema.BuilderMap{"foo": schema.String().Const("bar")}).Schema(),
764766
}
@@ -884,7 +886,9 @@ func TestOpenYAMLEnvironment(t *testing.T) {
884886
func TestGetOpenEnvironment(t *testing.T) {
885887
t.Run("OK", func(t *testing.T) {
886888
expected := &esc.Environment{
887-
Exprs: map[string]esc.Expr{"foo": {Literal: "bar"}},
889+
Exprs: &esc.Expr{
890+
Object: map[string]esc.Expr{"foo": {Literal: "bar"}},
891+
},
888892
Properties: map[string]esc.Value{"foo": esc.NewValue("bar")},
889893
Schema: schema.Record(schema.BuilderMap{"foo": schema.String().Const("bar")}).Schema(),
890894
}
@@ -918,7 +922,9 @@ func TestGetOpenEnvironment(t *testing.T) {
918922
func TestGetAnonymousOpenEnvironment(t *testing.T) {
919923
t.Run("OK", func(t *testing.T) {
920924
expected := &esc.Environment{
921-
Exprs: map[string]esc.Expr{"foo": {Literal: "bar"}},
925+
Exprs: &esc.Expr{
926+
Object: map[string]esc.Expr{"foo": {Literal: "bar"}},
927+
},
922928
Properties: map[string]esc.Value{"foo": esc.NewValue("bar")},
923929
Schema: schema.Record(schema.BuilderMap{"foo": schema.String().Const("bar")}).Schema(),
924930
}

0 commit comments

Comments
 (0)