Skip to content

Commit 58904db

Browse files
committed
tests: change entity name for integration test
1 parent 85f07ab commit 58904db

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/integration-tests/subgraph-data-sources/schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
type Block @entity {
1+
type MirrorBlock @entity {
22
id: Bytes!
33
number: BigInt!
44
hash: Bytes!

tests/integration-tests/subgraph-data-sources/src/mapping.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Entity, log } from '@graphprotocol/graph-ts';
2-
import { Block } from '../generated/schema';
2+
import { MirrorBlock } from '../generated/schema';
33

44
export function handleEntity(blockEntity: Entity): void {
55
let blockNumber = blockEntity.getBigInt('number');
66
let blockHash = blockEntity.getBytes('hash');
77

88
log.info('Block number: {}', [blockNumber.toString()]);
99

10-
let block = new Block(blockHash);
10+
let block = new MirrorBlock(blockHash);
1111
block.number = blockNumber;
1212
block.hash = blockHash;
1313
block.save();

tests/tests/integration_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ async fn subgraph_data_sources(ctx: TestContext) -> anyhow::Result<()> {
521521
let subgraph = ctx.subgraph;
522522
assert!(subgraph.healthy);
523523
let expected_response = json!({
524-
"blocks": [
524+
"mirrorBlocks": [
525525
{ "number": "0" },
526526
{ "number": "1" },
527527
{ "number": "2" },
@@ -538,7 +538,7 @@ async fn subgraph_data_sources(ctx: TestContext) -> anyhow::Result<()> {
538538
query_succeeds(
539539
"Blocks should be right",
540540
&subgraph,
541-
"{ blocks(where: {number_lt: 10}, orderBy: number) { number } }",
541+
"{ mirrorBlocks(where: {number_lt: 10}, orderBy: number) { number } }",
542542
expected_response,
543543
)
544544
.await?;

0 commit comments

Comments
 (0)