Skip to content

Commit

Permalink
test share login page
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn committed Oct 16, 2023
1 parent ff64c9a commit bc163d9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"filename": "molecule/identity/verify.yml",
"hashed_secret": "3f42f2d120c36646b79792b8dccee509e1480ad0",
"is_verified": false,
"line_number": 44,
"line_number": 45,
"is_secret": false
}
],
Expand Down Expand Up @@ -279,5 +279,5 @@
}
]
},
"generated_at": "2023-10-16T09:05:33Z"
"generated_at": "2023-10-16T14:08:22Z"
}
18 changes: 18 additions & 0 deletions molecule/identity/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
that:
- ansible_facts.services['alfresco-content.service'].state == "running"
- ansible_facts.services['keycloak.service'].state == "running"
- ansible_facts.services['nginx.service'].state == "running"

- name: Retrieve contents of alfresco-global.properties
become: true
Expand Down Expand Up @@ -99,3 +100,20 @@
- "not share_config_xml['results'][3]['matches'][0]['secret']"
- "share_config_xml['results'][4]['matches'][0]['authServerUrl'] == 'http://localhost/auth'"
- "share_config_xml['results'][5]['matches'][0]['publicClient'] == 'true'"

- name: Retrieve share login page
ansible.builtin.uri:
url: "http://localhost/share"
return_content: true
register: this

- name: Assert keycloak login redirect
vars:
expected_url_prefix: http://localhost/auth/realms/alfresco/protocol/openid-connect/auth?response_type=code&client_id=alfresco&scope=openid
expected_login_submit: http://localhost/auth/realms/alfresco/login-actions/authenticate
ansible.builtin.assert:
quiet: true
that:
- this.redirected
- expected_url_prefix in this.url
- expected_login_submit in this.content

0 comments on commit bc163d9

Please sign in to comment.