github.com/kyma-project/kyma-environment-broker@v0.0.1/internal/storage/dbmodel/orchestration_test.go (about) 1 package dbmodel 2 3 import ( 4 "encoding/json" 5 "testing" 6 7 "github.com/kyma-project/kyma-environment-broker/common/orchestration" 8 "github.com/stretchr/testify/require" 9 ) 10 11 func TestOrchestration(t *testing.T) { 12 13 t.Run("success json", func(t *testing.T) { 14 var params orchestration.Parameters 15 err := json.Unmarshal([]byte(`{"targets":{"include":[]}}`), ¶ms) 16 require.NoError(t, err) 17 18 err = json.Unmarshal([]byte(`{"retryoperation": {}, "targets":{"include":[]}}`), ¶ms) 19 require.NoError(t, err) 20 21 err = json.Unmarshal([]byte(`{"retryoperation": {"immediate": true}, "targets":{"include":[]}}`), ¶ms) 22 require.NoError(t, err) 23 24 err = json.Unmarshal([]byte(`{"retryoperation": {"immediate": "true"}, "targets":{"include":[]}}`), ¶ms) 25 require.NoError(t, err) 26 }) 27 28 }