Documentation ¶
Index ¶
Constants ¶
const CreateRequest = `
{
"user": {
"password": "dummy_passw@rd"
}
}
`
CreateRequest provides the input to a Create request.
const CreateResponse = `` /* 214-byte string literal not displayed */
CreateResponse provides the output from a Create request.
const GetResult = `` /* 182-byte string literal not displayed */
GetResult provides a Get result.
const ListResult = `` /* 372-byte string literal not displayed */
ListResult provides a single page of user results.
const UpdateRequest = `
{
"user": {
"password": "dummy_passw@rd_updated"
}
}
`
UpdateRequest provides the input to as Update request.
const UpdateResult = GetResult
UpdateResult provides an update result.
Variables ¶
var ExpectedUsersSlice = []users.User{FirstUser, SecondUser}
ExpectedUsersSlice is the slice of users expected to be returned from ListResult.
var FirstUser = users.User{ Name: "ef5778e553a24d789c15c689e30adf5d", VPNEndpoints: []users.VPNEndpoint{ { Endpoint: "https://rca-sslvpn1-jp1.ecl.ntt.com", Type: "SSL-VPN", }, }, }
FirstUser is the first user in the List request.
var SecondUser = users.User{ Name: "8bbe05d4bec747189e0dab81e486969f-1005", VPNEndpoints: []users.VPNEndpoint{ { Endpoint: "https://rca-sslvpn1-jp1.ecl.ntt.com", Type: "SSL-VPN", }, }, }
SecondUser is the second user in the List request.
var SecondUserUpdated = users.User{ Name: "8bbe05d4bec747189e0dab81e486969f-1005", VPNEndpoints: []users.VPNEndpoint{ { Endpoint: "https://rca-sslvpn1-jp1.ecl.ntt.com", Type: "SSL-VPN", }, }, }
SecondUserUpdated is how SecondUser should look after an Update.
Functions ¶
func HandleCreateUserSuccessfully ¶
HandleCreateUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user creation.
func HandleDeleteUserSuccessfully ¶
HandleDeleteUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user deletion.
func HandleGetUserSuccessfully ¶
HandleGetUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that responds with a single user.
func HandleListUsersSuccessfully ¶
HandleListUsersSuccessfully creates an HTTP handler at `/users` on the test handler mux that responds with a list of two users.
func HandleUpdateUserSuccessfully ¶
HandleUpdateUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user update.
Types ¶
This section is empty.