testing

package
v3.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const CreateRequest = `
{
	"user": {
		"password": "dummy_passw@rd"
	}
}
`

CreateRequest provides the input to a Create request.

View Source
const CreateResponse = `` /* 214-byte string literal not displayed */

CreateResponse provides the output from a Create request.

View Source
const GetResult = `` /* 182-byte string literal not displayed */

GetResult provides a Get result.

View Source
const ListResult = `` /* 372-byte string literal not displayed */

ListResult provides a single page of user results.

View Source
const UpdateRequest = `
{
	"user": {
		"password": "dummy_passw@rd_updated"
	}
}
`

UpdateRequest provides the input to as Update request.

View Source
const UpdateResult = GetResult

UpdateResult provides an update result.

Variables

View Source
var ExpectedUsersSlice = []users.User{FirstUser, SecondUser}

ExpectedUsersSlice is the slice of users expected to be returned from ListResult.

View Source
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.

View Source
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.

View Source
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

func HandleCreateUserSuccessfully(t *testing.T)

HandleCreateUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user creation.

func HandleDeleteUserSuccessfully

func HandleDeleteUserSuccessfully(t *testing.T)

HandleDeleteUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user deletion.

func HandleGetUserSuccessfully

func HandleGetUserSuccessfully(t *testing.T)

HandleGetUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that responds with a single user.

func HandleListUsersSuccessfully

func HandleListUsersSuccessfully(t *testing.T)

HandleListUsersSuccessfully creates an HTTP handler at `/users` on the test handler mux that responds with a list of two users.

func HandleUpdateUserSuccessfully

func HandleUpdateUserSuccessfully(t *testing.T)

HandleUpdateUserSuccessfully creates an HTTP handler at `/users` on the test handler mux that tests user update.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL