Skip to content

macOS docker compatibility #734

@juliusknorr

Description

@juliusknorr

Since nextcloud/docker-ci#658 we have an arm image available, now trying to run viewer tests with the docker setup I ran into a problem that the docker container ip on macOS is not accessible from the host system without port mapping.

Filing this issue to further investigate options. We probably should try to automatically map to a port and use that instead.

Manual viewer patch to make it work:

diff --git a/cypress.config.ts b/cypress.config.ts
index f46e87aa..e99358f6 100644
--- a/cypress.config.ts
+++ b/cypress.config.ts
@@ -77,10 +77,11 @@ export default defineConfig({

                        // Before the browser launches
                        // starting Nextcloud testing container
-                       const ip = await startNextcloud(process.env.BRANCH)
+                       const ip = await startNextcloud(process.env.BRANCH, true, {
+                               exposePort: 8082,
+                       })
                        // Setting container's IP as base Url
-                       config.baseUrl = `http://${ip}/index.php`
-                       await waitOnNextcloud(ip)
+                       config.baseUrl = `http://localhost:8082/index.php`
                        await configureNextcloud([]) // pass empty array as WE are already the viewer
                        return config
                },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions