如何在Heroku CI的indyno postgres实例中从应用程序自动导入转储?

时间:2019-11-27 20:02:09

标签: heroku continuous-integration heroku-postgres

我正在将Heroku CI与dyno postgres实例一起使用。当测力计启动时,我想用我正在运行的Heroku应用程序之一的数据填充测力计postgres。如何以最好的方式做到这一点?

1 个答案:

答案 0 :(得分:0)

您将拥有一个function getCommentersEmailIds( username ) { let foundUserId = undefined; //first get user id of username return axios.get(...).then(...).then()... 脚本,然后将生产备份还原到本地postgres实例中。我们正在针对某些测试环境或数据库负载测试进行此操作。

但是通常来说这不是一个好主意。您的测试应设置自己的测试数据(夹具的设置/拆卸脚本)。否则,您至少会很快遇到性能问题。