mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-07-30 03:14:40 +00:00
[backport/2.1] molecule to ansible-test CI migration (#398)
integration testing migration from molecule to ansible-test
This commit is contained in:
2
tests/integration/targets/k8s_access_review/aliases
Normal file
2
tests/integration/targets/k8s_access_review/aliases
Normal file
@@ -0,0 +1,2 @@
|
||||
time=5
|
||||
k8s
|
||||
22
tests/integration/targets/k8s_access_review/tasks/main.yml
Normal file
22
tests/integration/targets/k8s_access_review/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Create a SelfSubjectAccessReview resource
|
||||
register: can_i_create_namespaces
|
||||
ignore_errors: yes
|
||||
k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: authorization.k8s.io/v1
|
||||
kind: SelfSubjectAccessReview
|
||||
spec:
|
||||
resourceAttributes:
|
||||
group: v1
|
||||
resource: Namespace
|
||||
verb: create
|
||||
|
||||
- name: Assert that the SelfSubjectAccessReview request succeded
|
||||
assert:
|
||||
that:
|
||||
- can_i_create_namespaces is successful
|
||||
- can_i_create_namespaces.result.status is defined
|
||||
- can_i_create_namespaces.result.status.allowed is defined
|
||||
- can_i_create_namespaces.result.status.allowed
|
||||
Reference in New Issue
Block a user