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

package testing

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

Index

Package Files

fixtures.go

Constants

const TestCreateLicenseOptsRaw = "" /* 160 byte string literal not displayed */

TestCreateLicenseOptsRaw represents marshalled options for the Create request.

const TestCreateLicenseResponseRaw = "" /* 412 byte string literal not displayed */

TestCreateLicenseResponseRaw represents a raw response from the Create request.

const TestGetLicenseResponseRaw = "" /* 636 byte string literal not displayed */

TestGetLicenseResponseRaw represents a raw response from the Get request.

const TestListLicensesResponseRaw = "" /* 1241 byte string literal not displayed */

TestListLicensesResponseRaw represents a raw response from the List request.

const TestListLicensesSingleResponseRaw = "" /* 403 byte string literal not displayed */

TestListLicensesSingleResponseRaw represents a raw response with a single license from the List request.

const TestManyLicensesInvalidResponseRaw = `
{
    "licenses": [
        {
            "id": "49338ac045f448e294b25d013f890317"
        }
    ]
}
`

TestManyLicensesInvalidResponseRaw represents a raw invalid response with several licenses.

const TestSingleLicenseInvalidResponseRaw = `
{
    "license": {
        "id": "49338ac045f448e294b25d013f890317"
    }
}
`

TestSingleLicenseInvalidResponseRaw represents a raw invalid response with a single license.

Variables

var TestCreateLicenseOpts = licenses.LicenseOpts{
    Licenses: []licenses.LicenseOpt{
        {
            Region:   "ru-2",
            Quantity: 1,
            Type:     "license_windows_2016_standard",
        },
    },
}

TestCreateLicenseOpts represent options for the Create request.

var TestCreateLicenseResponse = []*licenses.License{
    {
        ID:        1123123,
        NetworkID: "f40a1c7e-cde8-4059-8f7d-49122e08229e",
        SubnetID:  "9263c811-9a4d-48e6-a7cb-48561f742b39",
        PortID:    "",
        ProjectID: "49338ac045f448e294b25d013f890317",
        Region:    "ru-2",
        Status:    "DOWN",
        Type:      "license_windows_2016_standard",
    },
}

TestCreateLicenseResponse represents the unmarshalled TestCreateLicenseResponseRaw response.

var TestGetLicenseResponse = &licenses.License{
    ID:        123123,
    ProjectID: "49338ac045f448e294b25d013f890317",
    Region:    "ru-2",
    Servers: []servers.Server{
        {
            ID:      "253b680c-89f6-4c85-afbf-c9a67c92d3fe",
            Name:    "Node00",
            Status:  "ACTIVE",
            Updated: licenseServerTimeStamp,
        },
    },
    Status:    "ACTIVE",
    NetworkID: "69dc895a-6d2a-4aa7-b2a1-dc1c827a365c",
    SubnetID:  "74aadf51-26ba-44b3-af26-a248a9b271e8",
    PortID:    "5440825a-918b-4d07-abb7-dcf61970a9bf",
    Type:      "license_windows_2012_standard",
}

TestGetLicenseResponse represents an unmarshalled TestGetLicenseResponseRaw.

var TestListLicensesSingleResponse = []*licenses.License{
    {
        ID:        1123123,
        ProjectID: "49338ac045f448e294b25d013f890317",
        Region:    "ru-1",
        Status:    "DOWN",
        NetworkID: "72e78fbe-131a-403a-a4a5-0d04c074d6c7",
        SubnetID:  "e32eb719-fdc5-4e1e-83fe-42860f0d51b1",
        PortID:    "",
        Type:      "license_windows_2012_standard",
    },
}

TestListLicensesSingleResponse represents the unmarshalled TestListLicensesSingleResponseRaw response.

Package testing imports 3 packages (graph). Updated 2020-08-09. Refresh now. Tools for package owners.