Clamp ACM Integration Tests
The ACM functionalities and workflow are tested as part of the clamp Integration test suite written in Robot framework. These tests are available in the policy-docker repository and it can be executed against both docker and kubernetes deployments of clamp. ACM-R, kafka, policy-participant, http-participant, k8s-participant are deployed along with a participant simulator. In jenkins pipeline, these tests are periodically invoked against a docker deployment of clamp ACM components. This test suite should be updated periodically as and when new features and functionalities are added to the clamp ACM. The following table describes the various test cases that are being verified and their expected behaviour.
ACM Integration Tests
Test case |
Description |
Expected behavior |
|---|---|---|
HealthcheckAcm |
Verifies the ACM runtime is up and running |
Should receive a 200 success response with STATUS:UP |
HealthcheckParticipantSim |
Verifies the participant simulator is up and running |
Should receive a 200 success response with STATUS:UP |
HealthcheckApi |
Verifies the policy api is up and running |
Should receive a 200 success response with STATUS:UP |
HealthcheckPap |
Verifies the policy pap is up and running |
Should receive a 200 success response with STATUS:UP |
RegisterParticipants |
Sends a PUT request to ACM-R to request the participants for registration |
Should receive a 202 Accepted response from ACM-R |
InsertDataIntoDatabase |
Insert restored data into the Database used for testing automatic sync |
Should receive a 0 response from the script |
AcMigrationRestored |
Migration of an automation composition restored |
Should receive a 200 response and the AC instance should be migrated to to the target AC definition |
UpdateDataDatabase |
Update restored data into the Database |
Should receive a 0 response from the script |
ReviewAutomationCompositionRestored |
Review automation composition restored |
Should receive a 202 Accepted response and the substate should be present in the AC instance data |
AcDeleteRestored |
Undeploy and delete of an automation composition restored |
Should receive a 202 Accepted response and the restored AC instance should have been deleted in ACM-R |
DeleteACDefinitionsRestored |
Deprime and delete of the compositions definition restored |
Should receive a 200 response and the AC definition should be removed in ACM-R db |
InsertDataIntoDatabase2 |
Insert restored data into the Database used for testing manual sync |
Should receive a 0 response from the script |
SyncParticipant |
Manual sync participants |
Should receive a 202 Accepted response and the instance/composition restored should be present in participant |
AcDeleteRestored2 |
Undeploy and delete of an automation composition restored |
Should receive a 202 Accepted response and the restored AC instance should have been deleted in ACM-R |
CommissionAcDefinitionTimeout |
Commissions a service template for testing Prime Timeout |
Should receive a 201 created response from ACM_R |
TimeoutPrimeACDefinition |
Verify the priming timeout from participant sim by updating the participant sim behavior |
Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC definition should be TIMEOUT |
DeleteACDefinitionTimeout |
Delete automation composition definition used for testing Prime Timeout |
Should receive a 200 response and the AC definition should be removed in ACM-R db |
CommissionAutomationCompositionSimple |
Commissions a simple service template for testing Instance with one element |
Should receive a 201 created response from ACM_R |
PrimeACDefinitionsSimple |
Prime the simple AC definition that was previously commissioned |
Should receive a 202 Accepted response from ACM-R and the state of AC definition should be PRIMED |
InstantiateAutomationCompositionSimple |
Instantiate the simple Automation Composition |
Should receive a 201 Accepted response from ACM-R |
FailDeployAutomationCompositionSimple |
Verify the deployment failure for simple AC instance by updating the participant sim behavior |
Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED |
UnDeployAutomationCompositionSimple |
Undeploy the simple AC instance by updating the participant sim to success |
Should receive a 202 Accepted response and the deploy state of the simple AC instance should be UNDEPLOYED |
UnInstantiateAutomationCompositionSimple |
Uninstantiate the simple AC instance |
Should receive a 202 Accepted response and the simple AC instance should have been deleted in ACM-R |
DeleteACDefinitionSimple |
Deprime and Delete the simple automation composition definition |
Should receive a 200 response and the simple AC definition should be removed in ACM-R db |
CommissionAutomationComposition |
Commissions a Tosca service template to ACM-R |
Should receive a 201 created response from ACM_R |
CommissionAcDefinitionMigrationFrom |
Commissions a service template for testing Migration flow |
Should receive a 201 created response from ACM_R |
CommissionAcDefinitionMigrationTo |
Commissions a target service template for testing Migration flow |
Should receive a 201 created response from ACM_R |
PrimeACDefinitions |
Prime the AC definition that was previously commissioned |
Should receive a 202 Accepted response from ACM-R and the state of AC definition should be PRIMED |
FailPrimeACDefinitionFrom |
Verify the priming failure from participant sim by updating the participant sim behavior |
Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC definition should be FAILED |
PrimeACDefinitionFrom |
Prime the AC definition for migration test, by updating the participant sim behavior to success |
Should receive a 202 Accepted response from ACM-R and the state of AC definition should be PRIMED |
PrimeACDefinitionTo |
Prime the target AC definition for migration test |
Should receive a 202 Accepted response from ACM-R and the state of AC definition should be PRIMED |
DeleteUndeployedInstantiateAutomationComposition |
Instantiate and Uninstantiate of an AC instance never deployed |
Should receive a 202 Accepted response and the AC instance should have been deleted in ACM-R |
InstantiateAutomationComposition |
Instantiate the Automation Composition from the service template 1 |
Should receive a 201 Accepted response from ACM-R |
InstantiateAutomationCompositionTimeout |
Instantiate a Automation Composition for testing TIMEOUT |
Should receive a 201 Accepted response from ACM-R |
DeployAutomationCompositionTimeout |
Verify the deployment timeout for an AC instance by updating the participant sim behavior |
Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be TIMEOUT |
DeleteAutomationCompositionTimeout |
Uninstantiate the AC instance used for testing timeout |
Should receive a 202 Accepted response and the AC instance should have been deleted in ACM-R |
InstantiateAutomationCompositionMigrationFrom |
Instantiate the Automation Composition from the service template of migration test |
Should receive a 201 Accepted response from ACM-R |
FailPrepareAutomationCompositionMigrationFrom |
Verify the prepare failure for migration AC instance by updating the participant sim behavior |
Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED |
PrepareAutomationCompositionMigrationFrom |
Send Prepare request to ACM-R for the AC instance before deployment |
Should receive a 202 Accepted response from ACM-R |
FailDeployAutomationCompositionMigration |
Verify the deployment failure for migration AC instance by updating the participant sim behavior |
Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED |
DeployAutomationComposition |
Deploy the AC instance |
Should receive a 202 Accepted response from ACM-R and the state of AC instance in ACM-R should be changed to DEPLOYED |
CheckTraces |
Verify the traces are being recorded in Jaeger by fetching Jaeger endpoint |
Should receive a 200 response with trace values present |
CheckKafkaPresentInTraces |
Verify that kafka traces are being recorded in Jaeger |
Should receive a 200 response with kafka trace values present |
CheckHttpPresentInAcmTraces |
Verify that http traces are being recorded in jaeger |
Should receive a 200 response with http trace values present |
QueryPolicies |
verify the new policies are deployed by the Policy-participant in PAP |
Should receive a 200 response with Policy name present in the deployed policies |
QueryPolicyTypes |
Verify the new policy types are created by the Policy-participant in API |
Should receive a 200 response with Policy type present in the available policy types |
DeployAutomationCompositionMigration |
Deploy the migration AC instance after updating Participant sim to return success |
Should receive a 202 Accepted status and the deploy state should be DEPLOYED in ACM-R |
SendOutPropertiesToRuntime |
Update participant sim to send outProperties and verify it is updated in ACM-R |
Should receive 200 response from ACM-R and the response should contain the outProperties available under AC instance |
FailReviewAutomationCompositionMigrationFrom |
Verify the review failure for migration AC instance by updating the participant sim behavior |
Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED |
ReviewAutomationCompositionMigrationFrom |
Review the current state of AC instance |
Should receive a 202 Accepted response and the substate should be present in the AC instance data |
AutomationCompositionUpdate |
Update the AC instance properties in ACM-R |
Should receive a 200 response from ACM-R and the AC instance should contain the updated property values |
PrecheckAutomationCompositionMigration |
Precheck the Migration AC instance |
Should receive a 200 response and the AC instance should provide the substate info |
AutomationCompositionMigrationTo |
Migrate the AC instance |
Should receive a 200 response and the AC instance should be migrated to to the target AC definition |
FailAutomationCompositionMigration |
Verify the Migration failure for AC instance by updating the participant sim behavior |
Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED |
UnInstantiateAutomationComposition |
Undeploy and Uninstantiate the AC instance |
Should receive a 202 Accepted response and the AC instance should have been deleted in ACM-R |
FailUnDeployAutomationCompositionMigrationTo |
Verify the failure of undeploy in migration AC instance by updating the participant sim to fail |
Should receive a 202 Accepted response and the stateChangeResult of the instance in ACM-R should be FAILED |
UnDeployAutomationCompositionMigrationTo |
Undeploy the migration AC instance by updating the participant sim to success |
Should receive a 202 Accepted response and the deploy state of the migration AC instance should be UNDEPLOYED |
FailUnInstantiateACMigrationTo |
Verify the uninstantiate failure in migration AC instance after updating the participant sim to fail |
Should receive a 202 Accepted response, and the AC instance stateChangeResult should be FAILED in ACM-R |
UnInstantiateAutomationCompositionMigrationTo |
Uninstantiate the migration AC instance |
Should receive a 202 Accepted response and the migration AC instance should have been deleted in ACM-R |
InstantiateAutomationCompositionRollback |
Instantiate the Automation Composition for rollback test |
Should receive a 201 Accepted response from ACM-R |
DeployAutomationCompositionRollback |
Deploy the AC instance for rollback test |
Should receive a 202 Accepted status and the deploy state should be DEPLOYED in ACM-R |
FailAutomationCompositionMigrationRollback |
Verify the Migration failure for AC instance by updating the participant sim behavior |
Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED |
RollbackAutomationComposition |
Rollback the AC instance |
Should receive a 200 response and the AC instance should be Rolled back to to the original AC definition |
FailAutomationCompositionMigrationRollback2 |
Verify the Migration failure for AC instance by updating the participant sim behavior |
Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED |
FailRollbackAutomationComposition |
Verify the Rollback failure for AC instance by updating the participant sim behavior |
Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED |
UnInstantiateAutomationCompositionRollback |
Uninstantiate the AC instance |
Should receive a 202 Accepted response and the AC instance should have been deleted in ACM-R |
FailDePrimeACDefinitionsFrom |
Verify the failure of deprime in migration AC definition by updating the participant sim to fail |
Should receive a 202 Accepted response and the migration AC definition in ACM-R should have stateChangeResult FAILED |
DeleteACDefinitionFrom |
Deprime and Delete the migration automation composition definition |
Should receive a 200 response and the migration AC definition should be removed in ACM-R db |
DeleteACDefinitions |
Deprime and Delete automation composition definition |
Should receive a 200 response and the AC definition should be removed in ACM-R db |
DeleteACDefinitionTo |
Deprime and Delete the target automation composition definition |
Should receive a 200 response and the target AC definition should be removed in ACM-R db |