Initializes principals and returns them for scenarios
(t *testing.T, auth *Authenticator)
| 1501 | |
| 1502 | // Initializes principals and returns them for scenarios |
| 1503 | func initializeScenario(t *testing.T, auth *Authenticator) { |
| 1504 | user, err := auth.NewUser("alice", "password", nil) |
| 1505 | assert.NoError(t, err) |
| 1506 | err = auth.Save(user) |
| 1507 | assert.NoError(t, err) |
| 1508 | |
| 1509 | role, err := auth.NewRole("foo", nil) |
| 1510 | assert.NoError(t, err) |
| 1511 | err = auth.Save(role) |
| 1512 | assert.NoError(t, err) |
| 1513 | |
| 1514 | // Get principals to do initial ops on |
| 1515 | _, _ = getPrincipals(t, auth) |
| 1516 | } |
| 1517 | |
| 1518 | // ======================================================================================================= |
| 1519 | // The below 'TestRevocationScenario' tests refer to scenarios in the following Google Sheet |
no test coverage detected