| 1 |
# Copyright (c) Dexter Le ([email protected]) |
| 2 |
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) |
| 3 |
# SPDX-License-Identifier: GPL-3.0-or-later |
| 4 |
|
| 5 |
--- |
| 6 |
anchors: |
| 7 |
environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: false} |
| 8 |
test_cases: |
| 9 |
- id: test_info_initial_offline |
| 10 |
input: {} |
| 11 |
output: |
| 12 |
failed: true |
| 13 |
msg: "pcs resource config failed with error (rc=1): Error: unable to get cib" |
| 14 |
version: "0.10.0" |
| 15 |
cluster_info: |
| 16 |
cluster_name: test_cluster |
| 17 |
cluster_uuid: test_uuid |
| 18 |
mocks: |
| 19 |
run_command: |
| 20 |
- command: [/testbin/pcs, --version] |
| 21 |
environ: *env-def |
| 22 |
rc: 0 |
| 23 |
out: "0.10.0" |
| 24 |
err: "" |
| 25 |
- command: [/testbin/pcs, cluster, config, --output-format=json] |
| 26 |
environ: *env-def |
| 27 |
rc: 0 |
| 28 |
out: '{"cluster_name": "test_cluster", "cluster_uuid": "test_uuid"}' |
| 29 |
err: "" |
| 30 |
- command: [/testbin/pcs, constraint, config, --output-format=json] |
| 31 |
environ: *env-def |
| 32 |
rc: 0 |
| 33 |
out: '{"location": [{"attributes": {"constraint_id": "test-constraint-id", "node": "example.com", "score": "-INFINITY"}, "resource_id": "test-resource-id", "role": "Started"}]}' |
| 34 |
err: "" |
| 35 |
- command: [/testbin/pcs, property, config, --output-format=json] |
| 36 |
environ: *env-def |
| 37 |
rc: 0 |
| 38 |
out: '{"nvsets": [{"id": "test-bootstrap", "name": "test-infra", "value": "corosync"}]}' |
| 39 |
err: "" |
| 40 |
- command: [/testbin/pcs, resource, config, --output-format=json] |
| 41 |
environ: *env-def |
| 42 |
rc: 1 |
| 43 |
out: "" |
| 44 |
err: "Error: unable to get cib" |
| 45 |
- id: test_info_initial_online |
| 46 |
input: {} |
| 47 |
output: |
| 48 |
version: "0.10.0" |
| 49 |
cluster_info: |
| 50 |
cluster_name: test_cluster |
| 51 |
cluster_uuid: test_uuid |
| 52 |
resource_info: |
| 53 |
clones: |
| 54 |
- description: null |
| 55 |
id: test-clone |
| 56 |
member_id: test-member-0 |
| 57 |
stonith_info: |
| 58 |
primitives: |
| 59 |
- agent_name: |
| 60 |
provider: null |
| 61 |
standard: stonith |
| 62 |
type: fence_aws |
| 63 |
description: null |
| 64 |
id: test-stonith |
| 65 |
constraint_info: |
| 66 |
location: |
| 67 |
- attributes: |
| 68 |
constraint_id: test-constraint-id |
| 69 |
node: example.com |
| 70 |
score: -INFINITY |
| 71 |
resource_id: test-resource-id |
| 72 |
role: Started |
| 73 |
property_info: |
| 74 |
nvsets: |
| 75 |
- id: test-bootstrap |
| 76 |
name: test-infra |
| 77 |
value: corosync |
| 78 |
mocks: |
| 79 |
run_command: |
| 80 |
- command: [/testbin/pcs, --version] |
| 81 |
environ: *env-def |
| 82 |
rc: 0 |
| 83 |
out: "0.10.0" |
| 84 |
err: "" |
| 85 |
- command: [/testbin/pcs, cluster, config, --output-format=json] |
| 86 |
environ: *env-def |
| 87 |
rc: 0 |
| 88 |
out: '{"cluster_name": "test_cluster", "cluster_uuid": "test_uuid"}' |
| 89 |
err: "" |
| 90 |
- command: [/testbin/pcs, constraint, config, --output-format=json] |
| 91 |
environ: *env-def |
| 92 |
rc: 0 |
| 93 |
out: '{"location": [{"attributes": {"constraint_id": "test-constraint-id", "node": "example.com", "score": "-INFINITY"}, "resource_id": "test-resource-id", "role": "Started"}]}' |
| 94 |
err: "" |
| 95 |
- command: [/testbin/pcs, property, config, --output-format=json] |
| 96 |
environ: *env-def |
| 97 |
rc: 0 |
| 98 |
out: '{"nvsets": [{"id": "test-bootstrap", "name": "test-infra", "value": "corosync"}]}' |
| 99 |
err: "" |
| 100 |
- command: [/testbin/pcs, resource, config, --output-format=json] |
| 101 |
environ: *env-def |
| 102 |
rc: 0 |
| 103 |
out: '{"clones": [{"description": null, "id": "test-clone", "member_id": "test-member-0"}]}' |
| 104 |
err: "" |
| 105 |
- command: [/testbin/pcs, stonith, config, --output-format=json] |
| 106 |
environ: *env-def |
| 107 |
rc: 0 |
| 108 |
out: '{"primitives": [{"agent_name": {"provider": null, "standard": "stonith", "type": "fence_aws"}, "description": null, "id": "test-stonith"}]}' |
| 109 |
err: "" |