Skip to content

Commit

Permalink
Temp fix to workaround LimeChain/etherlime#315
Browse files Browse the repository at this point in the history
  • Loading branch information
elenadimitrova committed Mar 16, 2020
1 parent 8a45e8c commit b3ffb5b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/simpleUpgrader.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,16 @@ describe("Test SimpleUpgrader", function () {

describe("Registering modules", () => {

it("should register modules in the registry", async () => {
it.only("should register modules in the registry", async () => {
let name = "test_1.1";
let initialModule = await deployer.deploy(Module, {}, registry.contractAddress, false, 0);
await registry.registerModule(initialModule.contractAddress, ethers.utils.formatBytes32String(name));
let isRegistered;
// Here we adjust how we call isRegisteredModule which has 2 overlaods, one accepting a single address
// and a second accepting an array of addresses. Behaviour as to which overload is selected to run
// differs between CI and Coverage environments, adjusted for this here
if (process.env.CI && process.env.SOLIDITY_COVERAGE) {
isRegistered = await registry.isRegisteredModule([initialModule.contractAddress]);
} else {
isRegistered = await registry.isRegisteredModule(initialModule.contractAddress);
}
isRegistered = await registry["isRegisteredModule(address)"](initialModule.contractAddress);

assert.equal(isRegistered, true, "module1 should be registered");
let info = await registry.moduleInfo(initialModule.contractAddress);
assert.equal(ethers.utils.parseBytes32String(info), name, "module1 should be registered with the correct name");
Expand Down

0 comments on commit b3ffb5b

Please sign in to comment.