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

package testing

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

Index

Package Files

fixtures.go

Constants

const TestCreateSubnetsOptsRaw = "" /* 305 byte string literal not displayed */

TestCreateSubnetsOptsRaw represents marshalled options for the Create request.

const TestCreateSubnetsResponseRaw = "" /* 442 byte string literal not displayed */

TestCreateSubnetsResponseRaw represents a raw response from the Create request.

const TestGetSubnetResponseRaw = "" /* 561 byte string literal not displayed */

TestGetSubnetResponseRaw represents a raw response from the Get request.

const TestListSubnetsResponseRaw = "" /* 446 byte string literal not displayed */

TestListSubnetsResponseRaw represents a raw response from the List request.

const TestListSubnetsSingleResponseRaw = "" /* 237 byte string literal not displayed */

TestListSubnetsSingleResponseRaw represents a raw response with a single subnet from the List request.

const TestManySubnetsInvalidResponseRaw = `
{
    "subnets": [
        {
            "id": "222"
        }
    ]
}
`

TestManySubnetsInvalidResponseRaw represents a raw invalid response with several subnets.

const TestSingleSubnetInvalidResponseRaw = `
{
    "subnet": [
        {
            "id": "222"
        }
    ]
}
`

TestSingleSubnetInvalidResponseRaw represents a raw invalid response with a single subnet.

Variables

var TestCreateSubnetResponse = []*subnets.Subnet{
    {
        CIDR:      "203.0.113.0/29",
        ID:        112233,
        ProjectID: "9c97bdc75295493096cf5edcb8c37933",
        Region:    "ru-2",
        Status:    "DOWN",
    },
    {
        CIDR:      "198.51.100.0/29",
        ID:        112234,
        ProjectID: "9c97bdc75295493096cf5edcb8c37933",
        Region:    "ru-1",
        Status:    "DOWN",
    },
}

TestCreateSubnetResponse represents the unmarshalled TestCreateSubnetsResponseRaw response.

var TestCreateSubnetsOpts = subnets.SubnetOpts{
    Subnets: []subnets.SubnetOpt{
        {
            Region:       "ru-2",
            Quantity:     1,
            Type:         selvpcclient.IPv4,
            PrefixLength: 29,
        },
        {
            Region:       "ru-1",
            Quantity:     1,
            Type:         selvpcclient.IPv4,
            PrefixLength: 29,
        },
    },
}

TestCreateSubnetsOpts represent options for the Create request.

var TestGetSubnetResponse = &subnets.Subnet{
    ID:     111122,
    Status: "ACTIVE",
    Servers: []servers.Server{
        {
            ID:      "253b680c-89f6-4c85-afbf-c9a67c92d3fe",
            Name:    "Node01",
            Status:  "ACTIVE",
            Updated: subnetServerTimeStamp,
        },
    },
    Region:    "ru-3",
    CIDR:      "203.0.113.0/24",
    NetworkID: "8233f12e-c47e-4f1c-953a-1ecd322a7119",
    SubnetID:  "94425a6e-19cd-412d-9710-ff40b34a78f4",
    ProjectID: "49338ac045f448e294b25d013f890317",
}

TestGetSubnetResponse represents an unmarshalled TestGetSubnetResponseRaw.

var TestListSubnetsSingleResponse = []*subnets.Subnet{
    {
        CIDR:      "203.0.113.0/24",
        ID:        112233,
        ProjectID: "49338ac045f448e294b25d013f890317",
        Region:    "ru-3",
        Status:    "ACTIVE",
    },
}

TestListSubnetsSingleResponse represents the unmarshalled TestListSubnetsSingleResponseRaw response.

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