Add ACM regression test suite
[policy/docker.git] / policy-regression-tests / policy-clamp-regression / src / test / resources / features / acm-basic-workflow.feature
1 Feature: ACM basic workflow
2   # Verifies ACM basic workflows commission, prime, de-prime, instantiate, deploy, update-properties, undeploy, uninstantiate and delete.
3
4   Scenario: ACM Health check should be up
5     When the acm health check endpoint is invoked "/onap/policy/clamp/acm/health"
6     Then the response status code should be 200
7
8   Scenario Outline: Verify the ACM commissioning works
9     When the ACM commissioning endpoint "/onap/policy/clamp/acm/v2/compositions" is invoked with "<AcDefinitionFile>" "<isMigration>"
10     Then the response status code should be 201
11     Examples:
12       | AcDefinitionFile                                                   | isMigration |
13       | src/test/resources/data/acelement-usecase1.json  | false       |
14
15   Scenario: Make sure the participants are registered with runtime
16     When the register participants endpoint is invoked "/onap/policy/clamp/acm/v2/participants"
17     Then the response status code should be 202
18
19   Scenario Outline: Verify the priming is accepted
20     When the ACM participants are primed "/onap/policy/clamp/acm/v2/compositions/{compositionId}" "<isMigration>"
21     Then the response status code should be 202
22     Examples:
23       | isMigration |
24       | false        |
25
26   Scenario Outline: Wait until all the participants are primed
27     When the ACM composition is fetched "/onap/policy/clamp/acm/v2/compositions/{compositionId}"
28     Then the response status code should be 200
29     Then Wait and retry until the response contains the keyword "PRIMED" "/onap/policy/clamp/acm/v2/compositions/{compositionId}" "<isMigration>"
30     Examples:
31       | isMigration |
32       | false        |
33
34   Scenario Outline: Verify AC Instantiation works
35     When the ACM instance is created "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances" with "<AcInstantiateFile>"
36     Then the response status code should be 201
37     Examples:
38       | AcInstantiateFile                                             |
39       | src/test/resources/data/AcInstantiate.json  |
40
41   Scenario: Verify the AC deployment is accepted
42     When the AC instance is deployed "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}"
43     Then the response status code should be 202
44
45   Scenario Outline: Wait until all the AC elements are deployed
46     When the AC instance is fetched "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}" "<isMigration>"
47     Then the response status code should be 200
48     Then Wait and retry until the response contains the keyword "DEPLOYED" "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}" "<isMigration>"
49     Examples:
50       | isMigration |
51       | false        |
52
53   Scenario Outline: Update instance property after deployment
54     When the AC instance property is updated "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances" "<AcUpdatePropertyFile>"
55     Then the response status code should be 200
56     Then Wait and retry until the response contains the keyword "DEPLOYED" "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}" "<isMigration>"
57     Then the response should contain the updated properties "acm_element_policy_updated" "test"
58     Examples:
59       | AcUpdatePropertyFile                                             | isMigration |
60       | src/test/resources/data/AcUpdateProperty.json  | false       |
61
62   Scenario: Verify AC instance undeployment is accepted
63     When the AC instance is undeployed "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}"
64     Then the response status code should be 202
65
66   Scenario Outline: Wait until all the AC elements are undeployed
67     When the AC instance is fetched "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}" "<isMigration>"
68     Then the response status code should be 200
69     Then Wait and retry until the response contains the keyword "UNDEPLOYED" "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}" "<isMigration>"
70     Examples:
71       | isMigration  |
72       | false        |
73
74   Scenario: Verify AC UnInstantiation is accepted
75     When the ACM instance is uninstantiated " /onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}"
76     Then the response status code should be 202
77
78   Scenario: Wait until the AC instance is uninstatiated
79     When all the AC instances are fetched "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances"
80     Then the response status code should be 200
81     Then Wait and retry until the ac instance list is empty "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances"
82
83   Scenario: Verify the DePriming is accepted
84     When the ACM participants are deprimed "/onap/policy/clamp/acm/v2/compositions/{compositionId}"
85     Then the response status code should be 202
86
87   Scenario Outline: Wait until all the participants are deprimed
88     When the ACM composition is fetched "/onap/policy/clamp/acm/v2/compositions/{compositionId}"
89     Then the response status code should be 200
90     Then Wait and retry until the response contains the keyword "COMMISSIONED" "/onap/policy/clamp/acm/v2/compositions/{compositionId}" "<isMigration>"
91     Examples:
92       | isMigration |
93       | false        |
94
95   Scenario: Verify the deletion of Ac definition
96     When the AC definition is deleted "/onap/policy/clamp/acm/v2/compositions/{compositionId}"
97     Then the response status code should be 200