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 = "" /* 252 byte string literal not displayed */

TestCreateLicenseResponseRaw represents a raw response from the Create request.

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

TestGetLicenseResponseRaw represents a raw response from the Get request.

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

TestListLicensesResponseRaw represents a raw response from the List request.

const TestListLicensesSingleResponseRaw = "" /* 243 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,
        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",
    Type:   "license_windows_2012_standard",
}

TestGetLicenseResponse represents an unmarshalled TestGetLicenseResponseRaw.

var TestListLicensesSingleResponse = []*licenses.License{
    {
        ID:        1123123,
        ProjectID: "49338ac045f448e294b25d013f890317",
        Region:    "ru-1",
        Status:    "DOWN",
        Type:      "license_windows_2012_standard",
    },
}

TestListLicensesSingleResponse represents the unmarshalled TestListLicensesSingleResponseRaw response.

Package testing imports 3 packages (graph). Updated 2018-12-12. Refresh now. Tools for package owners.