CodeChain-io / CodeChain-io/codechain-indexer
Inserting a row to the AssetImages table fails in the "test/-asset.spec.ts" test
- 主要语言
- TypeScript
- 星标
- 21
- 派生
- 15
- PR 合并指标
- 30 天内没有已合并 PR
描述
You can run the command below to make the error.
```
NODE_ENV=test yarn mocha --exit -r ts-node/register --timeout 60000 --recursive test/api/asset.spec.ts
```
Here is the log from the Postgresql when you run the command above.
```
2019-11-18 17:00:42.129 KST [72847] ERROR: insert or update on table "AssetImages" violates foreign key constraint "AssetImages_assetType_fkey"
2019-11-18 17:00:42.129 KST [72847] DETAIL: Key (assetType)=(b03745e7296053068a1ac475b377656574b394d3) is not present in table "AssetSchemes".
```
贡献指南
这个仓库没有索引到贡献指南
调研方向
Run NODE_ENV=test yarn mocha --exit -r ts-node/register --timeout 60000 --recursive test/api/asset.spec.ts and inspect test/api/asset.spec.ts first. Trace the AssetImages insert and the AssetImages_assetType_fkey relationship to AssetSchemes; done means the test no longer fails with the reported PostgreSQL foreign-key error.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- postgresql, typescript
- 领域
- databases, testing-qa
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100