File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
internal/cmd/postgresflex/instance/clone Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 44 "context"
55 "encoding/json"
66 "fmt"
7- "time"
87
98 "github.com/stackitcloud/stackit-cli/internal/pkg/args"
109 cliErr "github.com/stackitcloud/stackit-cli/internal/pkg/errors"
@@ -28,7 +27,7 @@ const (
2827 storageClassFlag = "storage-class"
2928 storageSizeFlag = "storage-size"
3029 recoveryTimestampFlag = "recovery-timestamp"
31- recoveryDateFormat = time . RFC3339
30+ recoveryDateFormat = "2006-01-02T15:04:05-07:00"
3231)
3332
3433type inputModel struct {
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ func fixtureRequiredInputModel(mods ...func(model *inputModel)) *inputModel {
9393 if err != nil {
9494 return & inputModel {}
9595 }
96- recoveryTimestampString := testRecoveryTimestamp .Format (time . RFC3339 )
96+ recoveryTimestampString := testRecoveryTimestamp .Format (recoveryDateFormat )
9797
9898 model := & inputModel {
9999 GlobalFlagModel : & globalflags.GlobalFlagModel {
@@ -114,7 +114,7 @@ func fixtureStandardInputModel(mods ...func(model *inputModel)) *inputModel {
114114 if err != nil {
115115 return & inputModel {}
116116 }
117- recoveryTimestampString := testRecoveryTimestamp .Format (time . RFC3339 )
117+ recoveryTimestampString := testRecoveryTimestamp .Format (recoveryDateFormat )
118118
119119 model := & inputModel {
120120 GlobalFlagModel : & globalflags.GlobalFlagModel {
@@ -146,7 +146,7 @@ func fixturePayload(mods ...func(payload *postgresflex.CloneInstancePayload)) po
146146 if err != nil {
147147 return postgresflex.CloneInstancePayload {}
148148 }
149- recoveryTimestampString := testRecoveryTimestamp .Format (time . RFC3339 )
149+ recoveryTimestampString := testRecoveryTimestamp .Format (recoveryDateFormat )
150150
151151 payload := postgresflex.CloneInstancePayload {
152152 Timestamp : utils .Ptr (recoveryTimestampString ),
@@ -354,7 +354,7 @@ func TestBuildRequest(t *testing.T) {
354354 if err != nil {
355355 return
356356 }
357- recoveryTimestampString := testRecoveryTimestamp .Format (time . RFC3339 )
357+ recoveryTimestampString := testRecoveryTimestamp .Format (recoveryDateFormat )
358358
359359 tests := []struct {
360360 description string
You can’t perform that action at this time.
0 commit comments