File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 11pub mod util;
22
3+ use graph:: components:: store:: { QueryStoreManager , SubgraphStore } ;
34use graph:: data:: subgraph:: DeploymentHash ;
5+ use graph:: prelude:: QueryTarget ;
6+
47use serde_json:: json;
58use test_store:: store:: create_test_subgraph;
69use test_store:: store:: NETWORK_NAME ;
7- use test_store:: store:: NODE_ID ;
10+ use test_store:: STORE ;
11+ use test_store:: SUBGRAPH_STORE ;
812
913use self :: util:: client:: send_graphql_request;
1014use self :: util:: run_test;
@@ -54,6 +58,15 @@ fn graphql_returns_deployment_info() {
5458 . await ;
5559
5660 let namespace = format ! ( "sgd{}" , locator. id) ;
61+ let node = SUBGRAPH_STORE . assigned_node ( & locator) . unwrap ( ) . unwrap ( ) ;
62+ let qs = STORE
63+ . query_store (
64+ QueryTarget :: Deployment ( locator. hash . clone ( ) , Default :: default ( ) ) ,
65+ false ,
66+ )
67+ . await
68+ . expect ( "could get a query store" ) ;
69+ let shard = qs. shard ( ) ;
5770
5871 let expected_resp = json ! ( {
5972 "data" : {
@@ -63,8 +76,8 @@ fn graphql_returns_deployment_info() {
6376 "hash" : "subgraph_1" ,
6477 "namespace" : namespace,
6578 "name" : "subgraph_1" ,
66- "nodeId" : NODE_ID . to_string( ) ,
67- "shard" : "primary" ,
79+ "nodeId" : node . to_string( ) ,
80+ "shard" : shard ,
6881 "chain" : NETWORK_NAME ,
6982 "versionStatus" : "current" ,
7083 "isActive" : true ,
You can’t perform that action at this time.
0 commit comments