awx icon indicating copy to clipboard operation
awx copied to clipboard

Allow surveys to have boolean questions

Open relrod opened this issue 3 years ago • 2 comments

SUMMARY

A go at boolean survey questions.

Refs #553 Refs #1782 Refs #1053

Signed-off-by: Rick Elrod [email protected]

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • API
  • UI

relrod avatar Nov 04 '22 07:11 relrod

@relrod does this PR still in draft ?

goldyfruit avatar Feb 14 '23 19:02 goldyfruit

Your test at awx/main/tests/unit/models/test_survey_models.py is good, but that handles an error case, and we need more testing than this for a high-level feature like this. I want to see the happy path tested, which is that true and false values are accepted... probably should verify this in both YAML / JSON. That can be done in the API tests with a mock request.

Beyond testing with the test database, we should also have full-cycle integration tests which test the happy path of valid survey answers and look for the value in a debug task that writes out hostvars (playbooks to accomplish this already exist).

AlanCoding avatar Jul 05 '23 19:07 AlanCoding