Skip to content

Commit

Permalink
refactor: Changed the mocker response node account id
Browse files Browse the repository at this point in the history
Signed-off-by: ivaylogarnev-limechain <[email protected]>
  • Loading branch information
ivaylogarnev-limechain committed Jan 28, 2025
1 parent c51ecec commit ef5f979
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/unit/AccountInfoMocking.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const ACCOUNT_INFO_QUERY_RESPONSE = {
accountID: {
shardNum: Long.ZERO,
realmNum: Long.ZERO,
accountNum: Long.fromNumber(10),
accountNum: Long.fromNumber(3),
},
key: {
ed25519: PRIVATE_KEY.publicKey.toBytesRaw(),
Expand Down Expand Up @@ -92,7 +92,7 @@ describe("AccountInfoMocking", function () {
.setAccountId("0.0.3")
.execute(client);

expect(info.accountId.toString()).to.be.equal("0.0.10");
expect(info.accountId.toString()).to.be.equal("0.0.3");
});

it("should retry on UNAVAILABLE", async function () {
Expand All @@ -108,7 +108,7 @@ describe("AccountInfoMocking", function () {
.setAccountId("0.0.3")
.execute(client);

expect(info.accountId.toString()).to.be.equal("0.0.10");
expect(info.accountId.toString()).to.be.equal("0.0.3");
});

it("should error when cost is greater than max cost set on client", async function () {
Expand Down Expand Up @@ -255,7 +255,7 @@ describe("AccountInfoMocking", function () {
.setAccountId("0.0.3")
.execute(client);

expect(info.accountId.toString()).to.be.equal("0.0.10");
expect(info.accountId.toString()).to.be.equal("0.0.3");
});

it("should be able to execute after getting transaction hashes", async function () {
Expand Down Expand Up @@ -613,7 +613,7 @@ describe("AccountInfoMocking", function () {
.setAccountId("0.0.3")
.execute(client);

expect(info.accountId.toString()).to.be.equal("0.0.10");
expect(info.accountId.toString()).to.be.equal("0.0.3");
});

describe("Node health checks", function () {
Expand Down Expand Up @@ -672,7 +672,7 @@ describe("AccountInfoMocking", function () {
.setAccountId("0.0.3")
.execute(client);

expect(info.accountId.toString()).to.be.equal("0.0.10");
expect(info.accountId.toString()).to.be.equal("0.0.3");
});

it("should execute with last healthy node when multiple nodes are unhealthy", async function () {
Expand All @@ -688,10 +688,9 @@ describe("AccountInfoMocking", function () {
new AccountId(4),
new AccountId(5),
])
.setAccountId("0.0.3")
.execute(client);

expect(info.accountId.toString()).to.be.equal("0.0.10");
expect(info.accountId.toString()).to.be.equal("0.0.3");
});
});
});

0 comments on commit ef5f979

Please sign in to comment.