我在 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/