testing

package
v0.0.0-...-8e7030c Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

clustering_policies_v1

Index

Constants

View Source
const PolicyBadUpdateBody = `` /* 665-byte string literal not displayed */
View Source
const PolicyBadValidateBody = `` /* 665-byte string literal not displayed */
View Source
const PolicyCreateBody = `` /* 697-byte string literal not displayed */
View Source
const PolicyDeleteRequestID = "req-7328d1b0-9945-456f-b2cd-5166b77d14a8"
View Source
const PolicyIDtoDelete = "1"
View Source
const PolicyIDtoUpdate = "b99b3ab4-3aa6-4fba-b827-69b88b9c544a"
View Source
const PolicyListBody1 = `` /* 742-byte string literal not displayed */
View Source
const PolicyListBody2 = `` /* 753-byte string literal not displayed */
View Source
const PolicyUpdateBody = `` /* 703-byte string literal not displayed */
View Source
const PolicyValidateBody = `` /* 703-byte string literal not displayed */

Variables

View Source
var ExpectedCreatePolicy = policies.Policy{
	CreatedAt: time.Date(2018, 4, 4, 0, 18, 36, 0, time.UTC),
	Data:      map[string]interface{}{},
	Domain:    "",
	ID:        "b99b3ab4-3aa6-4fba-b827-69b88b9c544a",
	Name:      "delpol4",
	Project:   "018cd0909fb44cd5bc9b7a3cd664920e",

	Spec: policies.Spec{
		Description: "A policy for choosing victim node(s) from a cluster for deletion.",
		Properties: map[string]interface{}{
			"hooks": map[string]interface{}{
				"params": map[string]interface{}{
					"queue": "zaqar_queue_name",
				},
				"timeout": float64(180),
				"type":    "zaqar",
			},
		},
		Type:    "senlin.policy.deletion",
		Version: "1.1",
	},
	Type: "senlin.policy.deletion-1.1",
	User: "fe43e41739154b72818565e0d2580819",
}
View Source
var ExpectedPolicy1 = policies.Policy{
	CreatedAt: time.Date(2018, 4, 2, 21, 43, 30, 0, time.UTC),
	Data:      map[string]interface{}{},
	Domain:    "",
	ID:        "PolicyListBodyID1",
	Name:      "delpol",
	Project:   "018cd0909fb44cd5bc9b7a3cd664920e",

	Spec: policies.Spec{
		Description: "A policy for choosing victim node(s) from a cluster for deletion.",
		Properties: map[string]interface{}{
			"criteria":                "OLDEST_FIRST",
			"destroy_after_deletion":  true,
			"grace_period":            float64(60),
			"reduce_desired_capacity": false,
		},
		Type:    "senlin.policy.deletion",
		Version: "1.0",
	},
	Type:      "senlin.policy.deletion-1.0",
	User:      "fe43e41739154b72818565e0d2580819",
	UpdatedAt: time.Date(2018, 4, 2, 0, 19, 12, 0, time.UTC),
}
View Source
var ExpectedPolicy2 = policies.Policy{
	CreatedAt: time.Date(2018, 4, 2, 22, 29, 36, 0, time.UTC),
	Data:      map[string]interface{}{},
	Domain:    "",
	ID:        "PolicyListBodyID2",
	Name:      "delpol2",
	Project:   "018cd0909fb44cd5bc9b7a3cd664920e",

	Spec: policies.Spec{
		Description: "A policy for choosing victim node(s) from a cluster for deletion.",
		Properties: map[string]interface{}{
			"criteria":                "OLDEST_FIRST",
			"destroy_after_deletion":  true,
			"grace_period":            float64(60),
			"reduce_desired_capacity": false,
		},
		Type:    "senlin.policy.deletion",
		Version: "1.0",
	},
	Type:      "senlin.policy.deletion-1.0",
	User:      "fe43e41739154b72818565e0d2580819",
	UpdatedAt: time.Date(2018, 4, 2, 23, 15, 11, 0, time.UTC),
}
View Source
var ExpectedUpdatePolicy = policies.Policy{
	CreatedAt: time.Date(2018, 4, 2, 21, 43, 30, 0, time.UTC),
	Data:      map[string]interface{}{},
	Domain:    "",
	ID:        "b99b3ab4-3aa6-4fba-b827-69b88b9c544a",
	Name:      "delpol4",
	Project:   "018cd0909fb44cd5bc9b7a3cd664920e",

	Spec: policies.Spec{
		Description: "A policy for choosing victim node(s) from a cluster for deletion.",
		Properties: map[string]interface{}{
			"hooks": map[string]interface{}{
				"params": map[string]interface{}{
					"queue": "zaqar_queue_name",
				},
				"timeout": float64(180),
				"type":    "zaqar",
			},
		},
		Type:    "senlin.policy.deletion",
		Version: "1.1",
	},
	Type: "senlin.policy.deletion-1.1",
	User: "fe43e41739154b72818565e0d2580819",
}
View Source
var ExpectedValidatePolicy = policies.Policy{
	CreatedAt: time.Date(2018, 4, 2, 21, 43, 30, 0, time.UTC),
	Data:      map[string]interface{}{},
	Domain:    "",
	ID:        "b99b3ab4-3aa6-4fba-b827-69b88b9c544a",
	Name:      "delpol4",
	Project:   "018cd0909fb44cd5bc9b7a3cd664920e",

	Spec: policies.Spec{
		Description: "A policy for choosing victim node(s) from a cluster for deletion.",
		Properties: map[string]interface{}{
			"hooks": map[string]interface{}{
				"params": map[string]interface{}{
					"queue": "zaqar_queue_name",
				},
				"timeout": float64(180),
				"type":    "zaqar",
			},
		},
		Type:    "senlin.policy.deletion",
		Version: "1.1",
	},
	Type: "senlin.policy.deletion-1.1",
	User: "fe43e41739154b72818565e0d2580819",
}

Functions

func HandleBadPolicyUpdate

func HandleBadPolicyUpdate(t *testing.T)

func HandleBadPolicyValidate

func HandleBadPolicyValidate(t *testing.T)

func HandlePolicyCreate

func HandlePolicyCreate(t *testing.T)

func HandlePolicyDelete

func HandlePolicyDelete(t *testing.T)

func HandlePolicyList

func HandlePolicyList(t *testing.T)

func HandlePolicyUpdate

func HandlePolicyUpdate(t *testing.T)

func HandlePolicyValidate

func HandlePolicyValidate(t *testing.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

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