Skip to content

Commit

Permalink
Fix failing unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
beautifulentropy committed Jun 14, 2024
1 parent ab452e6 commit 77fd15e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sa/sa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4316,6 +4316,10 @@ func TestUnpauseAccount(t *testing.T) {
sa, _, cleanUp := initSA(t)
defer cleanUp()

ptrTime := func(t time.Time) *time.Time {
return &t
}

type args struct {
state []pausedModel
req *sapb.RegistrationID
Expand All @@ -4341,6 +4345,7 @@ func TestUnpauseAccount(t *testing.T) {
Type: identifierTypeToUint[string(identifier.DNS)],
Value: "example.com",
},
PausedAt: ptrTime(sa.clk.Now().Add(-time.Hour)),
},
},
req: &sapb.RegistrationID{Id: 1},
Expand All @@ -4356,20 +4361,23 @@ func TestUnpauseAccount(t *testing.T) {
Type: identifierTypeToUint[string(identifier.DNS)],
Value: "example.com",
},
PausedAt: ptrTime(sa.clk.Now().Add(-time.Hour)),
},
{
RegistrationID: 1,
identifierModel: identifierModel{
Type: identifierTypeToUint[string(identifier.DNS)],
Value: "example.net",
},
PausedAt: ptrTime(sa.clk.Now().Add(-time.Hour)),
},
{
RegistrationID: 1,
identifierModel: identifierModel{
Type: identifierTypeToUint[string(identifier.DNS)],
Value: "example.org",
},
PausedAt: ptrTime(sa.clk.Now().Add(-time.Hour)),
},
},
req: &sapb.RegistrationID{Id: 1},
Expand Down

0 comments on commit 77fd15e

Please sign in to comment.