@@ -477,17 +477,18 @@ async fn test_ipfs_block() {
477477// The user_data value we use with calls to ipfs_map
478478const USER_DATA : & str = "user_data" ;
479479
480- fn make_thing ( id : & str , value : & str ) -> ( String , EntityModification ) {
481- const DOCUMENT : & str = " type Thing @entity { id: String!, value: String!, extra: String }" ;
480+ fn make_thing ( id : & str , value : & str , vid : i64 ) -> ( String , EntityModification ) {
481+ const DOCUMENT : & str =
482+ " type Thing @entity { id: String!, value: String!, extra: String, vid: Int8 }" ;
482483 lazy_static ! {
483484 static ref SCHEMA : InputSchema = InputSchema :: raw( DOCUMENT , "doesntmatter" ) ;
484485 static ref THING_TYPE : EntityType = SCHEMA . entity_type( "Thing" ) . unwrap( ) ;
485486 }
486- let data = entity ! { SCHEMA => id: id, value: value, extra: USER_DATA } ;
487+ let data = entity ! { SCHEMA => id: id, value: value, extra: USER_DATA , vid : vid } ;
487488 let key = THING_TYPE . parse_key ( id) . unwrap ( ) ;
488489 (
489490 format ! ( "{{ \" id\" : \" {}\" , \" value\" : \" {}\" }}" , id, value) ,
490- EntityModification :: insert ( key, data, 0 ) ,
491+ EntityModification :: insert ( key, data, 0 , vid ) ,
491492 )
492493}
493494
@@ -553,8 +554,8 @@ async fn test_ipfs_map(api_version: Version, json_error_msg: &str) {
553554 let subgraph_id = "ipfsMap" ;
554555
555556 // Try it with two valid objects
556- let ( str1, thing1) = make_thing ( "one" , "eins" ) ;
557- let ( str2, thing2) = make_thing ( "two" , "zwei" ) ;
557+ let ( str1, thing1) = make_thing ( "one" , "eins" , 0 ) ;
558+ let ( str2, thing2) = make_thing ( "two" , "zwei" , 0 ) ;
558559 let ops = run_ipfs_map (
559560 subgraph_id,
560561 format ! ( "{}\n {}" , str1, str2) ,
@@ -1001,8 +1002,8 @@ async fn test_entity_store(api_version: Version) {
10011002
10021003 let schema = store. input_schema ( & deployment. hash ) . unwrap ( ) ;
10031004
1004- let alex = entity ! { schema => id: "alex" , name: "Alex" } ;
1005- let steve = entity ! { schema => id: "steve" , name: "Steve" } ;
1005+ let alex = entity ! { schema => id: "alex" , name: "Alex" , vid : 0 } ;
1006+ let steve = entity ! { schema => id: "steve" , name: "Steve" , vid : 1 } ;
10061007 let user_type = schema. entity_type ( "User" ) . unwrap ( ) ;
10071008 test_store:: insert_entities (
10081009 & deployment,
0 commit comments