Skip to content

Commit

Permalink
Update role test_playbook to not use removed filter perm
Browse files Browse the repository at this point in the history
  • Loading branch information
Griffin-Sullivan committed Jul 5, 2024
1 parent 4dd722a commit e338728
Show file tree
Hide file tree
Showing 13 changed files with 1,004 additions and 2,015 deletions.
295 changes: 98 additions & 197 deletions tests/test_playbooks/fixtures/role-0.yml

Large diffs are not rendered by default.

206 changes: 69 additions & 137 deletions tests/test_playbooks/fixtures/role-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,33 @@ interactions:
User-Agent:
- apypie (https://github.com/Apipie/apypie)
method: GET
uri: https://centos7-foreman-1-22/api/status
uri: https://foreman.example.org/api/status
response:
body:
string: '{"result":"ok","status":200,"version":"1.22.1","api_version":2}'
string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}'
headers:
Cache-Control:
- max-age=0, private, must-revalidate
Connection:
- Keep-Alive
Content-Length:
- '63'
- '100'
Content-Security-Policy:
- 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:;
img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline''
''self''; style-src ''unsafe-inline'' ''self'''
img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self'';
style-src ''unsafe-inline'' ''self'''
Content-Type:
- application/json; charset=utf-8
Date:
- Fri, 15 Nov 2019 11:17:21 GMT
ETag:
- W/"7462024e111aafa1fe0b7de16a6757f0"
Foreman_api_version:
- '2'
Foreman_current_location:
- ; ANY
Foreman_current_organization:
- ; ANY
Foreman_version:
- 1.22.1
- 3.12.0-develop
Keep-Alive:
- timeout=5, max=100
Server:
- Apache
Set-Cookie:
- _session_id=cb9cbb9512cc32cf7199be19cca942c1; path=/; secure; HttpOnly; SameSite=Lax
Status:
- 200 OK
- timeout=15, max=100
Strict-Transport-Security:
- max-age=631139040; includeSubdomains
X-Content-Type-Options:
Expand All @@ -54,12 +48,6 @@ interactions:
- sameorigin
X-Permitted-Cross-Domain-Policies:
- none
X-Powered-By:
- Phusion Passenger 4.0.53
X-Request-Id:
- 6288fed9-79dd-4bb1-875e-c820db21038e
X-Runtime:
- '0.028726'
X-XSS-Protection:
- 1; mode=block
status:
Expand All @@ -74,46 +62,40 @@ interactions:
- gzip, deflate
Connection:
- keep-alive
Cookie:
- _session_id=cb9cbb9512cc32cf7199be19cca942c1
User-Agent:
- apypie (https://github.com/Apipie/apypie)
method: GET
uri: https://centos7-foreman-1-22/api/roles?search=name%3D%22test%22&per_page=4294967296
uri: https://foreman.example.org/api/roles?search=name%3D%22test%22&per_page=4294967296
response:
body:
string: "{\n \"total\": 12,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\":
string: "{\n \"total\": 36,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\":
4294967296,\n \"search\": \"name=\\\"test\\\"\",\n \"sort\": {\n \"by\":
\"name\",\n \"order\": \"ASC\"\n },\n \"results\": []\n}\n"
headers:
Cache-Control:
- max-age=0, private, must-revalidate
Connection:
- Keep-Alive
Content-Length:
- '174'
Content-Security-Policy:
- 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:;
img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline''
''self''; style-src ''unsafe-inline'' ''self'''
img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self'';
style-src ''unsafe-inline'' ''self'''
Content-Type:
- application/json; charset=utf-8
Date:
- Fri, 15 Nov 2019 11:17:21 GMT
ETag:
- W/"aa38de92c243e48a40befca440e5335d-gzip"
Foreman_api_version:
- '2'
Foreman_current_location:
- ; ANY
Foreman_current_organization:
- ; ANY
Foreman_version:
- 1.22.1
- 3.12.0-develop
Keep-Alive:
- timeout=5, max=99
Server:
- Apache
Status:
- 200 OK
- timeout=15, max=99
Strict-Transport-Security:
- max-age=631139040; includeSubdomains
Vary:
- Accept-Encoding
X-Content-Type-Options:
- nosniff
X-Download-Options:
Expand All @@ -122,16 +104,8 @@ interactions:
- sameorigin
X-Permitted-Cross-Domain-Policies:
- none
X-Powered-By:
- Phusion Passenger 4.0.53
X-Request-Id:
- 1b57109a-7c70-446a-a7e1-99a3982af65b
X-Runtime:
- '0.015672'
X-XSS-Protection:
- 1; mode=block
content-length:
- '174'
status:
code: 200
message: OK
Expand All @@ -144,48 +118,42 @@ interactions:
- gzip, deflate
Connection:
- keep-alive
Cookie:
- _session_id=cb9cbb9512cc32cf7199be19cca942c1
User-Agent:
- apypie (https://github.com/Apipie/apypie)
method: GET
uri: https://centos7-foreman-1-22/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296
uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296
response:
body:
string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\":
4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n
\ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2019-11-13
15:34:37 UTC\",\"updated_at\":\"2019-11-13 15:34:37 UTC\",\"id\":24,\"name\":\"Test
Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n"
4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\":
{\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-07-05
19:27:28 UTC\",\"updated_at\":\"2024-07-05 19:27:30 UTC\",\"id\":18,\"name\":\"Test
Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n"
headers:
Cache-Control:
- max-age=0, private, must-revalidate
Connection:
- Keep-Alive
Content-Length:
- '389'
Content-Security-Policy:
- 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:;
img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline''
''self''; style-src ''unsafe-inline'' ''self'''
img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self'';
style-src ''unsafe-inline'' ''self'''
Content-Type:
- application/json; charset=utf-8
Date:
- Fri, 15 Nov 2019 11:17:21 GMT
ETag:
- W/"7b2b50d642942afccab117cf1a96bbcf-gzip"
Foreman_api_version:
- '2'
Foreman_current_location:
- ; ANY
Foreman_current_organization:
- ; ANY
Foreman_version:
- 1.22.1
- 3.12.0-develop
Keep-Alive:
- timeout=5, max=98
Server:
- Apache
Status:
- 200 OK
- timeout=15, max=98
Strict-Transport-Security:
- max-age=631139040; includeSubdomains
Vary:
- Accept-Encoding
X-Content-Type-Options:
- nosniff
X-Download-Options:
Expand All @@ -194,16 +162,8 @@ interactions:
- sameorigin
X-Permitted-Cross-Domain-Policies:
- none
X-Powered-By:
- Phusion Passenger 4.0.53
X-Request-Id:
- 24097220-36b9-4c87-9a5c-c10fdef9bb85
X-Runtime:
- '0.014847'
X-XSS-Protection:
- 1; mode=block
content-length:
- '385'
status:
code: 200
message: OK
Expand All @@ -216,48 +176,42 @@ interactions:
- gzip, deflate
Connection:
- keep-alive
Cookie:
- _session_id=cb9cbb9512cc32cf7199be19cca942c1
User-Agent:
- apypie (https://github.com/Apipie/apypie)
method: GET
uri: https://centos7-foreman-1-22/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296
uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296
response:
body:
string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\":
4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\":
{\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2019-11-13
15:34:38 UTC\",\"updated_at\":\"2019-11-13 15:34:38 UTC\",\"id\":25,\"name\":\"Test
Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n"
4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n
\ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-07-05
19:27:26 UTC\",\"updated_at\":\"2024-07-05 19:27:26 UTC\",\"id\":17,\"name\":\"Test
Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n"
headers:
Cache-Control:
- max-age=0, private, must-revalidate
Connection:
- Keep-Alive
Content-Length:
- '385'
Content-Security-Policy:
- 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:;
img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline''
''self''; style-src ''unsafe-inline'' ''self'''
img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self'';
style-src ''unsafe-inline'' ''self'''
Content-Type:
- application/json; charset=utf-8
Date:
- Fri, 15 Nov 2019 11:17:21 GMT
ETag:
- W/"06a6671adb8e1b9b164f9e4f13da9996-gzip"
Foreman_api_version:
- '2'
Foreman_current_location:
- ; ANY
Foreman_current_organization:
- ; ANY
Foreman_version:
- 1.22.1
- 3.12.0-develop
Keep-Alive:
- timeout=5, max=97
Server:
- Apache
Status:
- 200 OK
- timeout=15, max=97
Strict-Transport-Security:
- max-age=631139040; includeSubdomains
Vary:
- Accept-Encoding
X-Content-Type-Options:
- nosniff
X-Download-Options:
Expand All @@ -266,22 +220,14 @@ interactions:
- sameorigin
X-Permitted-Cross-Domain-Policies:
- none
X-Powered-By:
- Phusion Passenger 4.0.53
X-Request-Id:
- f9116647-49b9-4824-bb1e-f02633b8c654
X-Runtime:
- '0.014713'
X-XSS-Protection:
- 1; mode=block
content-length:
- '413'
status:
code: 200
message: OK
- request:
body: '{"role": {"name": "test", "description": "test role", "location_ids": [24],
"organization_ids": [25]}}'
body: '{"role": {"name": "test", "description": "test role", "location_ids": [17],
"organization_ids": [18]}}'
headers:
Accept:
- application/json;version=2
Expand All @@ -293,49 +239,41 @@ interactions:
- '102'
Content-Type:
- application/json
Cookie:
- _session_id=cb9cbb9512cc32cf7199be19cca942c1
User-Agent:
- apypie (https://github.com/Apipie/apypie)
method: POST
uri: https://centos7-foreman-1-22/api/roles
uri: https://foreman.example.org/api/roles
response:
body:
string: '{"builtin":0,"cloned_from_id":null,"name":"test","id":46,"description":"test
role","origin":null,"filters":[],"locations":[{"id":24,"name":"Test Location","title":"Test
Location","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test
string: '{"builtin":0,"cloned_from_id":null,"name":"test","id":41,"description":"test
role","origin":null,"filters":[],"locations":[{"id":17,"name":"Test Location","title":"Test
Location","description":null}],"organizations":[{"id":18,"name":"Test Organization","title":"Test
Organization","description":"A test organization"}]}'
headers:
Cache-Control:
- max-age=0, private, must-revalidate
Connection:
- Keep-Alive
Content-Length:
- '319'
Content-Security-Policy:
- 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:;
img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline''
''self''; style-src ''unsafe-inline'' ''self'''
img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self'';
style-src ''unsafe-inline'' ''self'''
Content-Type:
- application/json; charset=utf-8
Date:
- Fri, 15 Nov 2019 11:17:21 GMT
ETag:
- W/"e9b85fd315096d9cd3c367fa72b3b715"
Foreman_api_version:
- '2'
Foreman_current_location:
- ; ANY
Foreman_current_organization:
- ; ANY
Foreman_version:
- 1.22.1
- 3.12.0-develop
Keep-Alive:
- timeout=5, max=96
Server:
- Apache
Set-Cookie:
- request_method=POST; path=/; secure; HttpOnly; SameSite=Lax
Status:
- 201 Created
- timeout=15, max=96
Strict-Transport-Security:
- max-age=631139040; includeSubdomains
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
X-Download-Options:
Expand All @@ -344,12 +282,6 @@ interactions:
- sameorigin
X-Permitted-Cross-Domain-Policies:
- none
X-Powered-By:
- Phusion Passenger 4.0.53
X-Request-Id:
- 095c4240-875b-4747-9a5c-5a0172a8d041
X-Runtime:
- '0.051032'
X-XSS-Protection:
- 1; mode=block
status:
Expand Down
Loading

0 comments on commit e338728

Please sign in to comment.