testing - CircleCI 与 AWS : RequestTimeTooSkewed error

标签 testing amazon-web-services time amazon-s3 circleci

我在 CircleCI 上运行测试并收到关于发布到 AWS S3 时出错的错误(通过 Paperclip's S3 integration )。

AWS::S3::Errors::RequestTimeTooSkewed: The difference between the request time and the current time is too large.

我试过设置 NTP 或 doing a curl request更新时间,但即使是 root 也没有权限,因为它是一个共享环境。

sudo date -s "$(curl -s --head http://google.com | grep ^Date: | sed 's/Date: //g')"

date: cannot set date: Operation not permitted

它在我的本地环境和生产环境中运行良好。我怎样才能让这些测试通过?

最佳答案

问题原来是Timecop作为测试框架的一部分卡住到较早的时间。这是通过安排事情解决的,所以这里不需要卡住。

感谢 CircleCI 的悉心支持而发现。

关于testing - CircleCI 与 AWS : RequestTimeTooSkewed error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29899840/

相关文章:

sql - 断开 RDS Oracle 数据库上的所有用户连接

amazon-web-services - TeamCity 代理 - AWS CLI

javascript - OpenLayers 测量 map 渲染时间

c++ - 用 cython 包装的 C++ 函数的计时

php - 如何简单地爆炸(d.m.Y H :i) using Php

ruby-on-rails - 使用 CircleCI 进行 Ruby Selenium 测试

testing - 将 revel 测试组织成子包

amazon-web-services - 使用 Terraform 将自动缩放配置应用于 lambda 预配置的并发

ruby-on-rails - Rails 单元测试是否应该命中数据库?

git - 在 Git 中提交之前临时清除未跟踪的文件