name: Check configurator disabled
testcases:
- name: disable_configurator
  steps:
  - type: http
    method: PATCH
    url: '{{.pfserver_webadmin_url}}/api/v1/configurator/config/base/advanced'
    ignore_verify_ssl: true
    body: >-
      {
        "configurator": "disabled"
      }
    headers:
      "Content-Type": "application/json"
    assertions:
      - result.statuscode ShouldEqual 200
      - result.bodyjson.message ShouldEqual "Settings updated"
    retry: 3
    delay: 20

- name: check_configurator_disabled
  steps:
  - type: http
    method: GET
    url: '{{.pfserver_webadmin_url}}/api/v1/configurator/config/interfaces'
    ignore_verify_ssl: true
    headers:
      "Content-Type": "application/json"
    assertions:
      - result.statuscode ShouldEqual 401
      - result.bodyjson.message ShouldContainSubstring 'The configurator is turned off'
