diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-03-17 11:44:53 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-03-19 11:57:14 +0100 |
commit | 45cfaa1b3ba9670a7c8b92fb65074cf574bfd028 (patch) | |
tree | e5948b7c896424249024a3a11153473b369bb456 /cypress/dockerNode.ts | |
parent | a243e9cfbbf99007f2b592196214b7252c1635f1 (diff) | |
download | nextcloud-server-45cfaa1b3ba9670a7c8b92fb65074cf574bfd028.tar.gz nextcloud-server-45cfaa1b3ba9670a7c8b92fb65074cf574bfd028.zip |
test: make cypress run in secure context and add WebAuthn tests
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'cypress/dockerNode.ts')
-rw-r--r-- | cypress/dockerNode.ts | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cypress/dockerNode.ts b/cypress/dockerNode.ts index 5da0ae96ad7..b65f164dc15 100644 --- a/cypress/dockerNode.ts +++ b/cypress/dockerNode.ts @@ -88,6 +88,12 @@ export const startNextcloud = async function(branch: string = getCurrentGitBranc Type: 'tmpfs', ReadOnly: false, }], + PortBindings: { + '80/tcp': [{ + HostIP: '0.0.0.0', + HostPort: '8083', + }], + }, }, Env: [ `BRANCH=${branch}`, @@ -242,11 +248,15 @@ export const getContainerIP = async function( while (ip === '' && tries < 10) { tries++ - await container.inspect(function(err, data) { + container.inspect(function(err, data) { if (err) { throw err } - ip = data?.NetworkSettings?.IPAddress || '' + if (data?.HostConfig.PortBindings?.['80/tcp']?.[0]?.HostPort) { + ip = `localhost:${data.HostConfig.PortBindings['80/tcp'][0].HostPort}` + } else { + ip = data?.NetworkSettings?.IPAddress || '' + } }) if (ip !== '') { |