(t *testing.T)
| 622 | } |
| 623 | |
| 624 | func TestRevocationScenario10(t *testing.T) { |
| 625 | defer db.SuspendSequenceBatching()() |
| 626 | |
| 627 | revocationTester, rt := InitScenario(t, nil) |
| 628 | defer rt.Close() |
| 629 | |
| 630 | resp := rt.SendAdminRequest("PUT", "/{{.keyspace}}/doc1", `{"channels": "ch1"}`) |
| 631 | RequireStatus(t, resp, http.StatusCreated) |
| 632 | |
| 633 | revocationTester.fillToSeq(4) |
| 634 | revocationTester.addRoleChannel("foo", "ch1") |
| 635 | |
| 636 | changes := revocationTester.getChanges(5, 0) |
| 637 | assert.Equal(t, "5", changes.Last_Seq.String()) |
| 638 | |
| 639 | revocationTester.fillToSeq(19) |
| 640 | revocationTester.addRole("user", "foo") |
| 641 | revocationTester.fillToSeq(44) |
| 642 | revocationTester.removeRole("user", "foo") |
| 643 | revocationTester.fillToSeq(54) |
| 644 | revocationTester.removeRoleChannel("foo", "ch1") |
| 645 | revocationTester.fillToSeq(64) |
| 646 | revocationTester.addRole("user", "foo") |
| 647 | |
| 648 | revocationTester.fillToSeq(70) |
| 649 | changes = revocationTester.getChanges(5, 0) |
| 650 | assert.Equal(t, "5", changes.Last_Seq.String()) |
| 651 | |
| 652 | revocationTester.fillToSeq(74) |
| 653 | revocationTester.addRoleChannel("foo", "ch1") |
| 654 | revocationTester.fillToSeq(84) |
| 655 | revocationTester.removeRoleChannel("foo", "ch1") |
| 656 | revocationTester.fillToSeq(94) |
| 657 | revocationTester.removeRole("user", "foo") |
| 658 | |
| 659 | revocationTester.fillToSeq(110) |
| 660 | changes = revocationTester.getChanges(70, 0) |
| 661 | assert.Equal(t, "70", changes.Last_Seq.String()) |
| 662 | } |
| 663 | |
| 664 | func TestRevocationScenario11(t *testing.T) { |
| 665 | defer db.SuspendSequenceBatching()() |
nothing calls this directly
no test coverage detected