Uploaded image for project: 'Ansible Cloud Automation'
  1. Ansible Cloud Automation
  2. ACA-1672

Run Integration test with ansible-navigator using ServiceNow EE image and inventory file

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • content, servicenow
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      Instruction how to run Integration test with ansible-navigator using ServiceNow EE image:

       

      vi definition-file-ee.yaml:
       

      —--
      version: 3
      images:
        base_image:
          name: 10.0.205.19/ee-minimal-rhel8:latest
      dependencies:
        galaxy: requirements.yml
      additional_build_steps:
        prepend_base:
          - RUN pip3 install --upgrade pip setuptools wheel
          - ENV ANSIBLE_ROLES_PATH=/usr/share/ansible/collections/ansible_collections/servicenow/itsm/tests/integration/targets
      options:
        package_manager_path: /usr/bin/microdnf
      

       

      vi requirements.yml:

      ---
      collections:
        - name: git+https://github.com/ansible-collections/servicenow.itsm.git
          type: git
          version: main   

       

      vi inventory:
       

      [test_env]
      localhost
      [test_env:vars]
      ansible_connection=local
      ansible_become=False
      ansible_become_pass=
      collection_name=itsm
      collection_namespace=servicenow
      sn_host='https://ven01686.service-now.com'
      sn_username='<username>'
      sn_password='<password>'
      target_name="itsm_service_catalog_info"
      

       

      Build the image:

      ansible-builder build --no-cache --tag servicenow-ee:latest -f definition-file-ee.yaml --container-runtime=podman -v 3   

       

      Clone the AAP repo:

      GitHub repo to run integration test targets with ansible-navigator or AAP controller: https://github.com/ansible/aapqa-test-content

       

      Command to run integration target tests locally in the execution environment with ansible-navigator:
       

      ansible-navigator run --eei localhost/servicenow-ee:latest ./aapqa-test-content/run_integration_tests.yaml -i ./inventory --mode=stdout --pp never -vvv

            prabinov Polina Rabinovich
            prabinov Polina Rabinovich
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: