scim-server-php/test/integration/users.yml
Julien Schneider 693b732bd2 Publish first version of scim-server-php
- SCIM 2.0 server core library
- Postfix Admin SCIM API
- Mock SCIM server
2022-07-01 11:38:20 +02:00

51 lines
1.4 KiB
YAML

# Tests /Users SCIM endpoint
---
- hosts: all
ignore_errors: true
gather_facts: false
tasks:
- name: Create test folder
ansible.builtin.file:
dest: "/tmp/opf_ansible_output/{{ inventory_hostname }}"
state: directory
mode: '0755'
delegate_to: 127.0.0.1
- name: Get all users
uri:
url: "{{ users_address }}"
method: GET
return_content: true
validate_certs: false
delegate_to: 127.0.0.1
register: call_response
- name: Store reply under /tmp/
copy:
content: "{{ call_response.content }}"
dest: "/tmp/opf_ansible_output/{{ inventory_hostname }}/\
get_all_users.json"
delegate_to: 127.0.0.1
- hosts: all
ignore_errors: true
gather_facts: false
tasks:
- name: Create a user
uri:
body: '{"userName":"testuser","externalId":"testuserexternal","profileUrl":"https://www.example.com/testuser"}'
body_format: json
url: "{{ users_address }}"
method: POST
status_code: 201 # Expect 201 for a create user response
return_content: true
validate_certs: false
delegate_to: 127.0.0.1
register: call_response
- name: Store reply under /tmp/
copy:
content: "{{ call_response.content }}"
dest: "/tmp/opf_ansible_output/{{ inventory_hostname }}/\
create_user.json"
delegate_to: 127.0.0.1