docker-compose - 赛普拉斯和 Docker - 无法运行,因为未找到规范文件
问题描述
我正在尝试在 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 文件和文件夹已被复制,并且我可以验证我的测试文件是否存在。我已经坚持了一段时间,除了放弃之外我不确定该怎么做。
任何指导表示赞赏。
解决方案
结果赛普拉斯会自动检查/cypress/integration
文件夹。将我所有的柏树文件移动到这个文件夹中就可以了。
推荐阅读
- python - Pyspark - 使用地图功能填充字典
- python - 在python中为字典的字典编写一个函数
- consul - 向 consul 注册多个节点
- python - 使用 .get 从字典中检索值的问题
- java - 为什么 JBoss7.1.0EAP 在部署 2 个 ear 文件时给出 java.lang.OutOfMemoryError: Metaspace Error
- azure - 发送遥测时 CorrelationId 和 MessageId 的实际用途是什么?
- java - C# 套接字编程,接收到的套接字长度不正确
- angular - 角度材料分页器无法设置页面大小
- javascript - 如何从浏览器导入 Vue 组件 - 通过 CDN
- ruby-on-rails - 2241 非法硬件指令 rails s