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

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

InstantiateAutomationComposition

Instantiate the Automation Composition from the service template 1

Should receive a 201 Accepted response from 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

TimeoutDeployAutomationCompositionMigration

Start deployment in timing out for migration AC instance by updating the participant sim behavior

Should receive a 202 Accepted response from ACM-R

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

CheckTimeoutAutomationComposition

Verify the deployment is timing out for migration AC instance by updating the participant sim behavior

Should receive a 202 Accepted response from ACM-R

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

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

DePrimeACDefinitionsFrom

Deprime the migration AC definition from the participants

Should receive a 202 Accepted response and the migration AC definition in ACM-R should be moved to COMMISSIONED state

UnDeployAutomationComposition

Undeploy the AC instance

Should receive a 202 Accepted response and the AC instance in ACM-R should have the UNDEPLOYED status

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

UnInstantiateAutomationComposition

Uninstantiate the AC instance

Should receive a 202 Accepted response and the AC instance should have been deleted in ACM-R

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

DePrimeACDefinitions

Deprime the AC definition

Should receive a 202 Accepted response and the the AC definition in ACM-R should be moved to COMMISSIONED state

DePrimeACDefinitionsTo

Deprime the migration target AC definition from the participants

Should receive a 202 Accepted response and the target AC definition in ACM-R should be moved to COMMISSIONED state

DeleteACDefinition

Delete automation composition definition

Should receive a 200 response and the AC definition should be removed in ACM-R db

DeleteACDefinitionFrom

Delete the migration automation composition definition

Should receive a 200 response and the migration AC definition should be removed in ACM-R db

DeleteACDefinitionTo

Delete the target automation composition definition

Should receive a 200 response and the target AC definition should be removed in ACM-R db