Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

CN2 Pipeline Test Management

SUMMARY This section covers tasks that are specific to managing the test cases.

Trigger the CN2 Pipeline Test

Any valid commit automatically triggers the CN2 pipeline test. For the commit to be valid, you need to do the following:

  1. Apply the commit to the correct branch mentioned in the values.yaml.
  2. Verify that Argo CD is in sync state.
  3. Verify the commit will cross the threshold trigger.
    You can verify the threshold trigger setting in the configuration map named cn2-pipeline-configs.

Change Commit Threshold Trigger

Use this procedure to change the commit threshold trigger.

  1. To access the configuration map named cn2-pipeline-configs, run this command:

    Output:

  2. Change the testcase_trigger_threshold value for the number of commits you want to ignore. By default, this is set to 0.

Change Test Profiles

Use this procedure to change test profiles. This mapping configuration contains the workflow template to CN2 resource kind mapping. Only one template is selected for execution and the first map that matches has the higher priority. An asterisk (*) in kind: ['*'] has higher priority than any other kind matches and overrides every mapping.

  1. To access the configuration map named cn2tmpl-to-kind-map, run this command:

    Output:

    CN2 pipeline will trigger the test where the kind:['*'] value exists. By default, the profile it-cloud-arch1-sre2 is triggered. If we want to trigger any other profile

  2. To trigger another profile, change profile kind to kind:['*'].
    Note:

    Only one workflow can have *as kind: value.

Identify CN2 Pipeline Test Trigger

After installing CN2 pipeline, every valid commit in a given branch and folder will trigger the CN2 test. There is a commit processing workflow triggered after every commit that starts from resource-*, for example where the kind:['*'] value exists. This processes the commit and validates the commit against the threshold value and Argo CD synchronize.

  • The commit processing workflow looks like this:

  • The actual test workflow starts from CN2 and looks like this:

Access Test Results

You can access the test results in HTML format from the GUI.

  • To access test results, enter the following in your browser:

Uninstall the CN2 Pipeline

Use this procedure to uninstall and delete the CN2 pipeline.

  • To uninstall CN2 pipeline, run this command:

Output: