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