Skip to content

Commit

Permalink
Swap a for b
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammed-madi committed Feb 9, 2024
1 parent dd1fe36 commit c74439e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rest/revocation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1403,9 +1403,9 @@ func TestChannelHistoryPruning(t *testing.T) {
role, err = authenticator.GetRole("foo")
assert.NoError(t, err)
channelHistory := role.CollectionChannelHistory(s, c)
aHistory := channelHistory["a"]
aHistory := channelHistory["b"]
aHistory.UpdatedAt = time.Now().Add(-61 * time.Hour * 24).Unix()
channelHistory["a"] = aHistory
channelHistory["b"] = aHistory
t.Log(aHistory)

role.SetChannelHistory(channelHistory)
Expand All @@ -1422,15 +1422,15 @@ func TestChannelHistoryPruning(t *testing.T) {
resp = rt.SendAdminRequest("PUT", "/{{.keyspace}}/doc3", `{"channels": ["random"]}`)
RequireStatus(t, resp, http.StatusCreated)

//changes = revocationTester.getChanges(changes.Last_Seq, 1)
//assert.Len(t, changes.Results, 1)
changes = revocationTester.getChanges(changes.Last_Seq, 1)
assert.Len(t, changes.Results, 1)

role, err = authenticator.GetRole("foo")
assert.NoError(t, err)

t.Log(role.CollectionChannelHistory(s, c))
assert.NotContains(t, role.CollectionChannelHistory(s, c), "a")
assert.Contains(t, role.CollectionChannelHistory(s, c), "b")
assert.NotContains(t, role.CollectionChannelHistory(s, c), "b")
assert.Contains(t, role.CollectionChannelHistory(s, c), "a")
}

func TestChannelRevocationWithContiguousSequences(t *testing.T) {
Expand Down

0 comments on commit c74439e

Please sign in to comment.