squest icon indicating copy to clipboard operation
squest copied to clipboard

Functional test

Open Sispheor opened this issue 4 years ago • 1 comments

Create a functional test that valid the full Squest chain without mocking anything.

Step 1: testing playbooks

Create in the Squest project 3 testing playbook of a fake service

  • CREATE fake service
  • UPDATE fake service
  • DELETE fake service

Create fake service

Survey ask 2 variables:

  • file_name
  • content

Playbook task that:

  • generate a unique ID generated_id
  • create a file in the path /tmp/<generated_id>/<file_name> and write the $content in it.
  • send to squest instance update with generated_id and <file_name>

Update fake service

Survey:

  • content

Playbook task:

  • Use the received spec that contains the <generated_id>and <file_name> to update the file content

Delete fake service

No survey Auto accept and process

Playbook task:

  • Delete the folder /tmp/<generated_id>

Step 2: Playbook to deploy the job template with surveys in testing AWX

  • declare the Squest project
  • create 3 job template with survey
  • create or get an admin token that will be given to Squest

Step 3: Functional test playbook

  • Playbook that execute python script to:
    • Declare Tower
    • Create a service
    • Create update and delete operation
    • Create a request
    • Approve
    • Process
  • Confirm actions performed (connect to target host and check)
  • all the above with update operation
  • all the above with delete operation

Sispheor avatar Sep 29 '21 10:09 Sispheor

To do : Step 2 and Step 3

EliasBoulharts avatar Oct 04 '21 07:10 EliasBoulharts

This is now handled by Monkeyble

Sispheor avatar Jun 30 '23 09:06 Sispheor