testing

package
v0.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const CertificatesResponse = `` /* 158-byte string literal not displayed */
View Source
const ConfigStringResponse = `` /* 319-byte string literal not displayed */
View Source
const CreateResponse = `
{
  "tasks": [
    "50f53a35-42ed-40c4-82b2-5a37fb3e00bc"
  ]
}
`
View Source
const DeleteResponse = `
{
  "tasks": [
    "50f53a35-42ed-40c4-82b2-5a37fb3e00bc"
  ]
}
`
View Source
const GetResponse = `` /* 1048-byte string literal not displayed */
View Source
const ListInstancesResponse = `` /* 2955-byte string literal not displayed */
View Source
const ListResponse = `` /* 1071-byte string literal not displayed */
View Source
const UpgradeRequest = `
{
    "version": "v1.27.4"
}
`
View Source
const UpgradeResponse = `
{
  "tasks": [
    "50f53a35-42ed-40c4-82b2-5a37fb3e00bc"
  ]
}
`
View Source
const VersionResponse = `
{
  "count": 2,
  "results": [
    {
      "version": "v1.26.7"
    },
    {
      "version": "v1.27.4"
	}
  ]
}
`

Variables

View Source
var (
	Cluster1 = clusters.Cluster{
		ID:      "b1ba8a5e-62d7-4f06-9b94-eae7762ecacd",
		Name:    "cluster-1",
		KeyPair: "keypair",
		Status:  "Provisioned",
		Pools: []pools.ClusterPool{
			{
				ID:                 "f3446423-0a82-475a-a1bd-31ce788ace9e",
				Name:               "pool-1",
				FlavorID:           "g0-standard-2-4",
				NodeCount:          1,
				MinNodeCount:       1,
				MaxNodeCount:       2,
				Status:             "Running",
				BootVolumeType:     volumes.SsdHiIops,
				BootVolumeSize:     50,
				AutoHealingEnabled: true,
				CreatedAt:          createdTime,
				IsPublicIPv4:       false,
				ServerGroupPolicy:  "affinity",
				ServerGroupID:      "f3446423-0a82-475a-a1bd-31ce788ace9e",
				ServerGroupName:    "affinity",
			},
		},
		Version:       "v1.26.7",
		IsPublic:      false,
		FixedNetwork:  fixedNetwork,
		FixedSubnet:   fixedSubnet,
		CreatedAt:     createdTime,
		CreatorTaskID: creatorTaskID,
		ProjectID:     1234,
		RegionID:      7,
		Region:        "ED-10 Preprod",
	}
	Tasks1 = tasks.TaskResults{
		Tasks: []tasks.TaskID{"50f53a35-42ed-40c4-82b2-5a37fb3e00bc"},
	}
	Certificate1 = clusters.Certificate{
		Key:         "-----BEGIN RSA PRIVATE KEY-----\n-----END RSA PRIVATE KEY-----\n",
		Certificate: "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n",
	}
	Config1            = clusters.Config{Config: ConfigStringResponse}
	Config1Response, _ = json.Marshal(Config1)
	Instance1          = instances.Instance{
		ID:        "2246207d-fb9f-4ea4-acea-5b2cf77ff46b",
		Name:      "cluster-1-pool-1-machine-deployment-56bc6958d-jz6m4",
		CreatedAt: gcorecloud.JSONRFC3339ZZ{Time: createdTime},
		Status:    "ACTIVE",
		VMState:   "active",
		Flavor: flavors.Flavor{
			FlavorID:   "g0-standard-2-4",
			FlavorName: "g0-standard-2-4",
			VCPUS:      2,
			RAM:        4096,
		},
		Metadata: map[string]interface{}{
			"capgc/infra_machine_name": "cluster-1-pool-1-machine-template-j6c5g",
			"capgc/infra_machine_uid":  "1a08139a-d441-4311-8dfb-442fe366be95",
			"capgc/kubernetes_version": "v1.26.7",
			"gcloud_cluster_name":      "cluster-1",
			"gcloud_service":           "k8s",
			"gcloud_service_type":      "worker",
			"task_id":                  "9640f68f-5748-4113-90bd-67a66e985e43",
			"os_distro":                "Ubuntu",
			"os_type":                  "linux",
			"os_version":               "22.04",
			"image_name":               "gcloud-k8s-v1.26.7-xUbuntu_22.04-worker-0.0.1.raw",
			"image_id":                 "d488fd8c-e70c-4bc2-b2b5-260960a083a2",
		},
		Volumes: []instances.InstanceVolume{
			{
				ID:                  "1ed838bb-2072-42a3-a5f6-d09777a3b023",
				DeleteOnTermination: false,
			},
		},
		Addresses: map[string][]instances.InstanceAddress{
			"cluster-1": {
				{
					Address: net.ParseIP("10.42.42.179"),
					Type:    types.AddressTypeFixed,
				},
			},
		},
		SecurityGroups: []gcorecloud.ItemName{
			{
				Name: "cluster-1-7-1234-worker",
			},
		},
		CreatorTaskID:    &creatorTaskID,
		ProjectID:        1234,
		RegionID:         7,
		Region:           "ED-10 Preprod",
		AvailabilityZone: "nova",
	}
	Version1 = clusters.Version{Version: "v1.26.7"}
	Version2 = clusters.Version{Version: "v1.27.4"}

	ExpectedClusterSlice   = []clusters.Cluster{Cluster1}
	ExpectedInstancesSlice = []instances.Instance{Instance1}
	ExpectedVersionSlice   = []clusters.Version([]clusters.Version{Version1, Version2})
)
View Source
var CreateRequest = `` /* 483-byte string literal not displayed */

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL