go-selvpcclient: github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/users/testing Index | Files

package testing

import "github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/users/testing"

Index

Package Files

fixtures.go

Constants

const TestCreateUserOptsRaw = `
{
    "user": {
        "name": "NewUser1",
        "password":"verysecret"
    }
}
`

TestCreateUserOptsRaw represents marshalled options for the Create request.

const TestCreateUserResponseRaw = "" /* 129 byte string literal not displayed */

TestCreateUserResponseRaw represents a raw response from the Create request.

const TestGetUserInvalidResponseRaw = `
{
    "user": {
        "id": 999
    }
}
`

TestGetUserInvalidResponseRaw represents a raw invalid response with single user.

const TestGetUsersResponseRaw = `
{
    "user": {
        "enabled": false,
        "id": "c4b7e0581b964c52a1597fe0931eccdf",
        "name": "User1"
    }
}
`

TestGetUsersResponseRaw represents a raw response from the Get request.

const TestListUsersResponseRaw = "" /* 292 byte string literal not displayed */

TestListUsersResponseRaw represents a raw response from the List request.

const TestListUsersSingleUserResponseRaw = "" /* 159 byte string literal not displayed */

TestListUsersSingleUserResponseRaw represents a raw response with a single user from the List request.

const TestManyUsersInvalidResponseRaw = `
{
    "users": [
        {
            "id": 222
        }
    ]
}
`

TestManyUsersInvalidResponseRaw represents a raw invalid response with several users.

const TestSingleUserInvalidResponseRaw = `
{
    "user": [
        {
            "id": 222
        }
    ]
}
`

TestSingleUserInvalidResponseRaw represents a raw invalid response with a single user.

const TestUpdateUserOptsRaw = `
{
    "user": {
        "name": "UpdatedUser1",
        "password":"supersecret"
    }
}
`

TestUpdateUserOptsRaw represents marshalled options for the Update request.

const TestUpdateUserResponseRaw = "" /* 133 byte string literal not displayed */

TestUpdateUserResponseRaw represents a raw response from the Update request.

Variables

var TestCreateUserOpts = users.UserOpts{
    Name:     "NewUser1",
    Password: "verysecret",
}

TestCreateUserOpts represent options for the Create request.

var TestCreateUserResponse = &users.User{
    ID:      "4b2e452ed4c940bd87a88499eaf14c4f",
    Name:    "NewUser1",
    Enabled: true,
}

TestCreateUserResponse represents the unmarshalled TestCreateUserResponseRaw response.

var TestGetUsersResponse = &users.User{
    ID:      "c4b7e0581b964c52a1597fe0931eccdf",
    Name:    "User1",
    Enabled: false,
}

TestGetUsersResponse represents the unmarshalled TestGetUsersResponseRaw response.

var TestListUsersSingleUserResponse = []*users.User{
    {
        Enabled: true,
        Name:    "User1",
        ID:      "4b2e452ed4c940bd87a88499eaf14c4f",
    },
}

TestListUsersSingleUserResponse represents the unmarshalled TestListUsersSingleUserResponseRaw response.

var TestUpdateUserOpts = users.UserOpts{
    Name:     "UpdatedUser1",
    Password: "supersecret",
}

TestUpdateUserOpts represents options for the Update request.

var TestUpdateUserResponse = &users.User{
    ID:      "4b2e452ed4c940bd87a88499eaf14c4f",
    Name:    "UpdatedUser1",
    Enabled: true,
}

TestUpdateUserResponse represents the unmarshalled TestUpdateUserResponseRaw response.

Package testing imports 1 packages (graph). Updated 2019-10-01. Refresh now. Tools for package owners.