Skip to content

Commit

Permalink
try fix the time convert issue
Browse files Browse the repository at this point in the history
  • Loading branch information
HuyPhanNguyen committed Dec 5, 2024
1 parent 14b5a15 commit dd423f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/deployment_freeze_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func createTestResources(t *testing.T, client *client.Client) *testResources {

func getTestDeploymentFreeze() *deploymentfreezes.DeploymentFreeze {
name := internal.GetRandomName()
startTime := time.Now().Add(time.Hour)
endTime := startTime.Add(time.Hour * 24)
startTime := time.Now().Add(time.Hour).UTC().Truncate(time.Second)
endTime := startTime.Add(time.Hour * 24).UTC().Truncate(time.Second)

return &deploymentfreezes.DeploymentFreeze{
Name: name,
Expand Down Expand Up @@ -206,7 +206,7 @@ func TestDeploymentFreezeRecurringSchedules(t *testing.T) {
Type: deploymentfreezes.Annually,
Unit: 1,
EndType: deploymentfreezes.OnDate,
EndOnDate: ptr(time.Now().AddDate(1, 0, 0)),
EndOnDate: ptr(time.Now().AddDate(1, 0, 0).UTC().Truncate(time.Second)),
},
validate: func(t *testing.T, freeze *deploymentfreezes.DeploymentFreeze) {
require.Equal(t, deploymentfreezes.Annually, freeze.RecurringSchedule.Type)
Expand Down

0 comments on commit dd423f6

Please sign in to comment.