【发布时间】:2019-01-03 23:00:15
【问题描述】:
我正在尝试在 docker 容器中运行 cypress 测试。我已经简化了设置,因此我可以尝试运行一个简单的容器实例并执行一些测试。
我正在使用 docker-compose
version: '2.1'
services:
e2e:
image: test/e2e:v1
command: ["./node_modules/.bin/cypress", "run", "--spec", "integration/mobile/all.js"]
build:
context: .
dockerfile: Dockerfile-cypress
container_name: cypress
network_mode: host
还有我的 Dockerfile-cypress
FROM cypress/browsers:chrome69
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
RUN npm install cypress@3.1.0
COPY cypress /usr/src/app/cypress
COPY cypress.json /usr/src/app/cypress
RUN ./node_modules/.bin/cypress verify
当我在构建图像后运行 docker-compose up 时,我看到了
cypress | name_to_handle_at on /dev: Operation not permitted
cypress | Can't run because no spec files were found.
cypress |
cypress | We searched for any files matching this glob pattern:
cypress |
cypress | integration/mobile/all-control.js
cypress exited with code 1
我已验证我的 cypress 文件和文件夹已被复制,并且我可以验证我的测试文件是否存在。我已经坚持了一段时间,我不确定除了放弃还能做什么。
任何指导表示赞赏。
【问题讨论】: