postgrest - postgrest `stack test` 给出:致命:数据库“test/create_test_db”postgres://postgres:pwd@database-host“tes”不存在
问题描述
stack test
给出错误:
postgrest> test (suite: spec)
psql: warning: extra command-line argument "-f" ignored
psql: warning: extra command-line argument "test/fixtures/database.sql" ignored
psql: FATAL: database "test/create_test_db "postgres://postgres:pwd@database-host" tes" does not exist
spec.exe: readCreateProcess: psql "--set" "ON_ERROR_STOP=1" "test/create_test_db \"postgres://postgres:pwd@database-host\" test_db" "Trader" "-f" "test/fixtures/database.sql" (exit 2): failed
postgrest> Test suite spec failed
Test suite failure for package postgrest-6.0.2
spec: exited with: ExitFailure 1
Logs printed to console
我在 Windows10 上,并设置了系统环境变量 POSTGREST_TEST_CONNECTION:
test/create_test_db "postgres://postgres:pwd@database-host" test_db
psql
在终端给出
psql (11.5)
WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
Type "help" for help.
Trader=#
解决方案
推荐阅读
- python - 为什么我的 Python while 循环没有终止?
- javascript - 如何让 JavsScript 回调等待另一个回调?
- python - 无法通过 Selenium Python 在 booking.com 中找到以查看文本
- c++ - 将 txt 文件保存到与 C++ 中的 cpp 文件相同的文件夹中的文件夹中
- html - 在 html、css 中缩小窗口大小时更改框的顺序
- php - 捕获未知的命名参数错误
- batch-file - 如何启动最小化的批处理文件
- xcode - SwiftUI:如何在水平滚动视图中监听鼠标滚轮滚动事件
- python - 在 Python Dash 中将上传的文本文件转换为 DataFrame
- css - 无法获得整页引导轮播中心并安装