Skip to content

Commit

Permalink
change string formatting for recovery timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
GokceGK committed Mar 18, 2024
1 parent 9beb9fe commit c32ac59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/postgresflex/instance/clone/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func parseInput(cmd *cobra.Command, inputArgs []string) (*inputModel, error) {
Details: err.Error(),
}
}
recoveryTimestampString := recoveryTimestamp.String()
recoveryTimestampString := recoveryTimestamp.Format(time.RFC3339)

return &inputModel{
GlobalFlagModel: globalFlags,
Expand Down
8 changes: 4 additions & 4 deletions internal/cmd/postgresflex/instance/clone/clone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func fixtureRequiredInputModel(mods ...func(model *inputModel)) *inputModel {
if err != nil {
return &inputModel{}
}
recoveryTimestampString := testRecoveryTimestamp.String()
recoveryTimestampString := testRecoveryTimestamp.Format(time.RFC3339)

model := &inputModel{
GlobalFlagModel: &globalflags.GlobalFlagModel{
Expand All @@ -111,7 +111,7 @@ func fixtureStandardInputModel(mods ...func(model *inputModel)) *inputModel {
if err != nil {
return &inputModel{}
}
recoveryTimestampString := testRecoveryTimestamp.String()
recoveryTimestampString := testRecoveryTimestamp.Format(time.RFC3339)

model := &inputModel{
GlobalFlagModel: &globalflags.GlobalFlagModel{
Expand Down Expand Up @@ -142,7 +142,7 @@ func fixturePayload(mods ...func(payload *postgresflex.CloneInstancePayload)) po
if err != nil {
return postgresflex.CloneInstancePayload{}
}
recoveryTimestampString := testRecoveryTimestamp.String()
recoveryTimestampString := testRecoveryTimestamp.Format(time.RFC3339)

payload := postgresflex.CloneInstancePayload{
Timestamp: utils.Ptr(recoveryTimestampString),
Expand Down Expand Up @@ -350,7 +350,7 @@ func TestBuildRequest(t *testing.T) {
if err != nil {
return
}
recoveryTimestampString := testRecoveryTimestamp.String()
recoveryTimestampString := testRecoveryTimestamp.Format(time.RFC3339)

tests := []struct {
description string
Expand Down

0 comments on commit c32ac59

Please sign in to comment.