Skip to content

Commit

Permalink
Fix tests (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
bokoto000 authored Nov 27, 2023
1 parent 246a4ca commit 51c6234
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/limechain/runtime/RuntimeBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static Imports getImports(Module module, HostApi hostApi) {

ArrayList<ImportObject> objects = new ArrayList<>();
objects.addAll(StorageHostFunctions.getFunctions(hostApi));
objects.addAll(ChildStorageHostFunctions.getFunctions());
objects.addAll(ChildStorageHostFunctions.getFunctions(hostApi));
objects.addAll(CryptoHostFunctions.getFunctions(hostApi));
objects.addAll(HashingHostFunctions.getFunctions(hostApi));
objects.addAll(OffchainHostFunctions.getFunctions(hostApi));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ public class ChildStorageHostFunctions {
private final HostApi hostApi;
private final KVRepository<String, Object> repository;

public ChildStorageHostFunctions() {
this.hostApi = HostApi.getInstance();
public ChildStorageHostFunctions(HostApi hostApi) {
this.hostApi = hostApi;
this.repository = SyncedState.getInstance().getRepository();
}

public static List<ImportObject> getFunctions() {
return new ChildStorageHostFunctions().buildFunctions();
public static List<ImportObject> getFunctions(HostApi hostApi) {
return new ChildStorageHostFunctions(hostApi).buildFunctions();
}

public List<ImportObject> buildFunctions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public void stopNode() {
}
}

@Disabled("This is integration test!")
@Test
@Disabled("No response is received")
//TODO: See https://github.com/orgs/LimeChain/projects/16?pane=issue&itemId=40022251
Expand All @@ -78,7 +77,6 @@ void remoteBlockRequest_returnCorrectBlock_ifGivenBlockHash() {
assertEquals(expected, response.getBlocks(0).getHash());
}

@Disabled("This is integration test!")
@Test
@Disabled("No response is received")
//TODO: See https://github.com/orgs/LimeChain/projects/16?pane=issue&itemId=40022251
Expand Down

0 comments on commit 51c6234

Please sign in to comment.