Documentation
¶
Overview ¶
trusts unit tests
Index ¶
- Constants
- Variables
- func HandleCheckTrustRoleSuccessfully(t *testing.T)
- func HandleCreateTokenWithTrustID(t *testing.T, options tokens.AuthOptionsBuilder, requestJSON string)
- func HandleCreateTrust(t *testing.T)
- func HandleCreateTrustNoExpire(t *testing.T)
- func HandleDeleteTrust(t *testing.T)
- func HandleGetTrustRoleSuccessfully(t *testing.T)
- func HandleGetTrustSuccessfully(t *testing.T)
- func HandleListTrustRolesSuccessfully(t *testing.T)
- func HandleListTrustsSuccessfully(t *testing.T)
Constants ¶
const CreateRequest = `` /* 414-byte string literal not displayed */
const CreateRequestNoExpire = `` /* 368-byte string literal not displayed */
const CreateResponse = `` /* 713-byte string literal not displayed */
const CreateResponseNoExpire = `` /* 660-byte string literal not displayed */
const GetResponse = `` /* 762-byte string literal not displayed */
GetOutput provides a Get result.
const GetTrustRoleResponse = `` /* 171-byte string literal not displayed */
const ListResponse = `` /* 723-byte string literal not displayed */
ListOutput provides a single page of Role results.
const ListTrustRolesResponse = `` /* 398-byte string literal not displayed */
Variables ¶
var CreatedTrust = trusts.Trust{ ID: "3422b7c113894f5d90665e1a79655e23", Impersonation: false, TrusteeUserID: "ecb37e88cc86431c99d0332208cb6fbf", TrustorUserID: "959ed913a32c4ec88c041c98e61cbbc3", ProjectID: "9b71012f5a4a4aef9193f1995fe159b2", ExpiresAt: time.Date(2019, 12, 01, 14, 00, 00, 0, time.UTC), DeletedAt: time.Time{}, RedelegationCount: 10, Roles: []trusts.Role{ { ID: "b627fca5-beb0-471a-9857-0e852b719e76", Name: "member", }, }, }
var CreatedTrustNoExpire = trusts.Trust{ ID: "3422b7c113894f5d90665e1a79655e23", Impersonation: false, TrusteeUserID: "ecb37e88cc86431c99d0332208cb6fbf", TrustorUserID: "959ed913a32c4ec88c041c98e61cbbc3", ProjectID: "9b71012f5a4a4aef9193f1995fe159b2", DeletedAt: time.Time{}, RedelegationCount: 10, Roles: []trusts.Role{ { ID: "b627fca5-beb0-471a-9857-0e852b719e76", Name: "member", }, }, }
var ExpectedTrustRolesSlice = []trusts.Role{FirstRole, SecondRole}
var ExpectedTrustsSlice = []trusts.Trust{FirstTrust, SecondTrust}
ExpectedRolesSlice is the slice of roles expected to be returned from ListOutput.
var FirstRole = trusts.Role{
ID: "c1648e",
Name: "manager",
}
var FirstTrust = trusts.Trust{ ID: "1ff900", Impersonation: true, TrusteeUserID: "86c0d5", TrustorUserID: "a0fdfd", ProjectID: "0f1233", ExpiresAt: time.Date(2019, 12, 01, 14, 00, 00, 0, time.UTC), DeletedAt: time.Time{}, }
var SecondRole = trusts.Role{
ID: "ed7b78",
Name: "member",
}
Functions ¶
func HandleCheckTrustRoleSuccessfully ¶ added in v0.11.0
HandleCheckTrustRoleSuccessfully creates an HTTP handler at `/OS-TRUST/trusts/987fe8/roles/c1648e` on the test handler mux that responds with a list trust roles.
func HandleCreateTokenWithTrustID ¶
func HandleCreateTokenWithTrustID(t *testing.T, options tokens.AuthOptionsBuilder, requestJSON string)
HandleCreateTokenWithTrustID verifies that providing certain AuthOptions and Scope results in an expected JSON structure.
func HandleCreateTrust ¶ added in v0.3.0
HandleCreateTrust creates an HTTP handler at `/OS-TRUST/trusts` on the test handler mux that tests trust creation.
func HandleCreateTrustNoExpire ¶ added in v0.11.0
HandleCreateTrustNoExpire creates an HTTP handler at `/OS-TRUST/trusts` on the test handler mux that tests trust creation.
func HandleDeleteTrust ¶ added in v0.3.0
HandleDeleteUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user deletion.
func HandleGetTrustRoleSuccessfully ¶ added in v0.11.0
HandleGetTrustRoleSuccessfully creates an HTTP handler at `/OS-TRUST/trusts/987fe8/roles/c1648e` on the test handler mux that responds with a trust role details.
func HandleGetTrustSuccessfully ¶ added in v0.9.0
HandleGetTrustSuccessfully creates an HTTP handler at `/OS-TRUST/trusts` on the test handler mux that responds with a single trusts.
func HandleListTrustRolesSuccessfully ¶ added in v0.11.0
HandleListTrustRolesSuccessfully creates an HTTP handler at `/OS-TRUST/trusts/987fe8/roles` on the test handler mux that responds with a list trust roles.
func HandleListTrustsSuccessfully ¶ added in v0.9.0
HandleListTrustsSuccessfully creates an HTTP handler at `/OS-TRUST/trusts` on the test handler mux that responds with a list of two trusts.
Types ¶
This section is empty.