Skip to content

Commit

Permalink
test: pre set data for under attack
Browse files Browse the repository at this point in the history
  • Loading branch information
aldy505 committed Dec 25, 2023
1 parent 86e0561 commit c0b1546
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions underattack/are_we_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ func TestAreWe(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*30)
defer cancel()

err := dependency.Datastore.SetUnderAttackStatus(ctx, 1, true, time.Now().Add(time.Hour), 0)
if err != nil {
t.Fatalf("setting under attack status: %s", err.Error())
}

attacked, err := dependency.AreWe(ctx, 1)
if err != nil {
t.Errorf("unexpected error: %v", err)
Expand Down

0 comments on commit c0b1546

Please sign in to comment.