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

package testing

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

Index

Package Files

fixtures.go

Constants

const TestCreateProjectAutoQuotasOptsRaw = `
{
    "project": {
        "name": "Project2",
        "auto_quotas": true
    }
}
`

TestCreateProjectAutoQuotasOptsRaw represents marshalled options for the Create request with auto_quotas parameter.

const TestCreateProjectAutoQuotasResponseRaw = "" /* 425 byte string literal not displayed */

TestCreateProjectAutoQuotasResponseRaw represents a raw response from the Create request with auto_quotas parameter.

const TestCreateProjectNoQuotasOptsRaw = `
{
    "project": {
        "name": "Project2",
        "auto_quotas": false
    }
}
`

TestCreateProjectNoQuotasOptsRaw represents a raw request body without quotas.

const TestCreateProjectOptsRaw = "" /* 271 byte string literal not displayed */

TestCreateProjectOptsRaw represents marshalled options for the Create request.

const TestCreateProjectResponseRaw = "" /* 175 byte string literal not displayed */

TestCreateProjectResponseRaw represents a raw response from the Create request.

const TestGetProjectResponseRaw = "" /* 975 byte string literal not displayed */

TestGetProjectResponseRaw represents a raw response from the Get request.

const TestGetProjectResponseSingleQuotaRaw = "" /* 540 byte string literal not displayed */

TestGetProjectResponseSingleQuotaRaw represents a raw response with a single quota from the Get request.

const TestListProjectsResponseRaw = "" /* 458 byte string literal not displayed */

TestListProjectsResponseRaw represents a raw response from the List request.

const TestListProjectsResponseSingleRaw = "" /* 244 byte string literal not displayed */

TestListProjectsResponseSingleRaw represents a raw response with a single project from the List request.

const TestManyProjectsInvalidResponseRaw = `
{
    "projects": [
        {
            "id": 12
        }
    ]
}
`

TestManyProjectsInvalidResponseRaw represents a raw invalid response with many projects.

const TestSingleProjectInvalidResponseRaw = `
{
    "project": {
        "id": 12
    }
}
`

TestSingleProjectInvalidResponseRaw represents a raw invalid response with a single project.

const TestUpdateProjectOptsRaw = `
{
    "project": {
        "name": "Project3",
        "theme": {
            "color": "#581845"
        }
    }
}
`

TestUpdateProjectOptsRaw represents marshalled options for the Update request.

const TestUpdateProjectResponseRaw = "" /* 286 byte string literal not displayed */

TestUpdateProjectResponseRaw represents a raw response from the Update request.

Variables

var TestCreateProjectAutoQuotasOpts = projects.CreateOpts{
    Name:       "Project2",
    AutoQuotas: true,
}

TestCreateProjectAutoQuotasOpts represent options for the Create request with auto_quotas parameter.

var TestCreateProjectAutoQuotasResponse = &projects.Project{
    ID:      "9c97bdc75295493096cf5edcb8c37933",
    Name:    "Project2",
    URL:     "https://yyyyyy.selvpc.ru",
    Enabled: true,
    Quotas: []quotas.Quota{
        {
            Name: "compute_cores",
            ResourceQuotasEntities: []quotas.ResourceQuotaEntity{
                {
                    Region: "ru-1",
                    Zone:   "ru-1b",
                    Value:  10,
                    Used:   2,
                },
            },
        },
    },
}

TestCreateProjectAutoQuotasResponse represents the unmarshalled TestCreateProjectAutoQuotasResponseRaw response.

var TestCreateProjectNoQuotasOpts = projects.CreateOpts{
    Name: "Project2",
}

TestCreateProjectNoQuotasOpts represents project create options without quotas.

var TestCreateProjectOpts = projects.CreateOpts{
    Name: "Project2",
    Quotas: []quotas.QuotaOpts{
        {
            Name: "image_gigabytes",
            ResourceQuotasOpts: []quotas.ResourceQuotaOpts{
                {
                    Region: "ru-1",
                    Value:  &imageGigabytesValue,
                },
            },
        },
    },
}

TestCreateProjectOpts represent options for the Create request.

var TestCreateProjectResponse = &projects.Project{
    ID:      "9c97bdc75295493096cf5edcb8c37933",
    Name:    "Project2",
    URL:     "https://yyyyyy.selvpc.ru",
    Enabled: true,
}

TestCreateProjectResponse represents the unmarshalled TestCreateProjectResponseRaw response.

var TestGetProjectSingleQuotaResponse = &projects.Project{
    ID:        "49338ac045f448e294b25d013f890317",
    Name:      "Project1",
    URL:       "https://xxxxxx.selvpc.ru",
    Enabled:   true,
    CustomURL: "",
    Theme: projects.Theme{
        Color: "#581845",
        Logo:  "",
    },
    Quotas: []quotas.Quota{
        {
            Name: "compute_cores",
            ResourceQuotasEntities: []quotas.ResourceQuotaEntity{
                {
                    Region: "ru-1",
                    Zone:   "ru-1b",
                    Value:  10,
                    Used:   2,
                },
            },
        },
    },
}

TestGetProjectSingleQuotaResponse represents the unmarshalled TestGetProjectResponseSingleQuotaRaw response.

var TestListProjectsSingleResponse = []*projects.Project{
    {
        ID:        "49338ac045f448e294b25d013f890317",
        Name:      "Project1",
        URL:       "https://xxxxxx.selvpc.ru",
        Enabled:   true,
        CustomURL: "",
    },
}

TestListProjectsSingleResponse represents the unmarshalled TestListProjectsResponseSingleRaw response.

var TestUpdateProjectOpts = projects.UpdateOpts{
    Name: "Project3",
    Theme: &projects.ThemeUpdateOpts{
        Color: &color,
    },
}

TestUpdateProjectOpts represent options for the Update request.

var TestUpdateProjectResponse = &projects.Project{
    ID:        "f9ede488e5f14bac8962d8c53d0af9f4",
    Name:      "Project3",
    URL:       "https://zzzzzz.selvpc.ru",
    Enabled:   true,
    CustomURL: "",
    Theme: projects.Theme{
        Color: "#581845",
        Logo:  "",
    },
}

TestUpdateProjectResponse represents the unmarshalled TestUpdateProjectResponseRaw response.

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