Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add network integration of stargate with docker image #27

Merged
merged 10 commits into from
Jun 16, 2022
8 changes: 4 additions & 4 deletions packages/stargate/src/modules/authz/queries.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
defaultSigningClientOptions,
faucet,
makeRandomAddress,
pendingWithoutSimapp44,
pendingWithoutSimapp,
simapp,
simapp44Enabled,
simappEnabled,
} from "../../testutils.spec";
import { AuthzExtension, setupAuthzExtension } from "./queries";

Expand All @@ -37,7 +37,7 @@ xdescribe("AuthzExtension", () => {
const grantedMsg = "/lbm.distribution.v1.MsgWithdrawDelegatorReward";

beforeAll(async () => {
if (simapp44Enabled()) {
if (simappEnabled()) {
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic, {
// Use address 1 and 2 instead of 0 to avoid conflicts with other delegation tests
// This must match `voterAddress` above.
Expand Down Expand Up @@ -81,7 +81,7 @@ xdescribe("AuthzExtension", () => {

describe("grants", () => {
it("works", async () => {
pendingWithoutSimapp44();
pendingWithoutSimapp();
const [client, tmClient] = await makeClientWithAuthz(simapp.tendermintUrl);
const response = await client.authz.grants(granter1Address, grantee1Address, "");
expect(response.grants.length).toEqual(1);
Expand Down
70 changes: 35 additions & 35 deletions packages/stargate/src/modules/ibc/queries.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Tendermint34Client } from "@lbmjs/ostracon-rpc";
import Long from "long";

import { QueryClient } from "../../queryclient";
import { pendingWithoutSimapp42, simapp } from "../../testutils.spec";
import { pendingWithoutSimapp, simapp } from "../../testutils.spec";
import * as ibcTest from "./ibctestdata.spec";
import { IbcExtension, setupIbcExtension } from "./queries";

Expand All @@ -16,7 +16,7 @@ describe("IbcExtension", () => {
// describe("channel", () => {
// describe("channel", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.channel(ibcTest.portId, ibcTest.channelId);
Expand All @@ -30,7 +30,7 @@ describe("IbcExtension", () => {
//
// describe("channels", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.channels();
Expand All @@ -44,7 +44,7 @@ describe("IbcExtension", () => {
//
// describe("allChannels", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.allChannels();
Expand All @@ -56,7 +56,7 @@ describe("IbcExtension", () => {
//
// describe("connectionChannels", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.connectionChannels(ibcTest.connectionId);
Expand All @@ -70,7 +70,7 @@ describe("IbcExtension", () => {
//
// describe("allConnectionChannels", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.allConnectionChannels(ibcTest.connectionId);
Expand All @@ -82,7 +82,7 @@ describe("IbcExtension", () => {
//
// describe("clientState", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.clientState(ibcTest.portId, ibcTest.channelId);
Expand All @@ -100,7 +100,7 @@ describe("IbcExtension", () => {
//
// describe("consensusState", () => {
// xit("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.consensusState(
Expand All @@ -122,7 +122,7 @@ describe("IbcExtension", () => {
//
// describe("packetCommitment", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.packetCommitment(
Expand All @@ -140,7 +140,7 @@ describe("IbcExtension", () => {
//
// describe("packetCommitments", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.packetCommitments(ibcTest.portId, ibcTest.channelId);
Expand All @@ -154,7 +154,7 @@ describe("IbcExtension", () => {
//
// describe("allPacketCommitments", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.allPacketCommitments(ibcTest.portId, ibcTest.channelId);
Expand All @@ -166,7 +166,7 @@ describe("IbcExtension", () => {
//
// describe("packetReceipt", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.packetReceipt(ibcTest.portId, ibcTest.channelId, 1);
Expand All @@ -179,7 +179,7 @@ describe("IbcExtension", () => {
// describe("packetAcknowledgement", () => {
// it("works", async () => {
// pending("We don't have an acknowledgement for testing at the moment");
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.packetAcknowledgement(
Expand All @@ -197,7 +197,7 @@ describe("IbcExtension", () => {
//
// describe("packetAcknowledgements", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.packetAcknowledgements(ibcTest.portId, ibcTest.channelId);
Expand All @@ -211,7 +211,7 @@ describe("IbcExtension", () => {
//
// describe("allPacketAcknowledgements", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.allPacketAcknowledgements(
Expand All @@ -226,7 +226,7 @@ describe("IbcExtension", () => {
//
// describe("unreceivedPackets", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.unreceivedPackets(
Expand All @@ -243,7 +243,7 @@ describe("IbcExtension", () => {
//
// describe("unreceivedAcks", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.unreceivedAcks(
Expand All @@ -260,7 +260,7 @@ describe("IbcExtension", () => {
//
// describe("nextSequenceReceive", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.channel.nextSequenceReceive(ibcTest.portId, ibcTest.channelId);
Expand All @@ -276,7 +276,7 @@ describe("IbcExtension", () => {
// describe("client", () => {
// describe("state", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.client.state(ibcTest.clientId);
Expand All @@ -291,7 +291,7 @@ describe("IbcExtension", () => {
//
// describe("states", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.client.states();
Expand All @@ -312,7 +312,7 @@ describe("IbcExtension", () => {
//
// describe("allStates", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.client.allStates();
Expand All @@ -332,7 +332,7 @@ describe("IbcExtension", () => {
//
// describe("consensusState", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.client.consensusState(ibcTest.clientId);
Expand All @@ -347,7 +347,7 @@ describe("IbcExtension", () => {
//
// describe("consensusStates", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.client.consensusStates(ibcTest.clientId);
Expand All @@ -369,7 +369,7 @@ describe("IbcExtension", () => {
//
// describe("allConsensusStates", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.client.allConsensusStates(ibcTest.clientId);
Expand All @@ -391,7 +391,7 @@ describe("IbcExtension", () => {
//
// describe("params", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.client.params();
Expand All @@ -405,7 +405,7 @@ describe("IbcExtension", () => {
//
// describe("stateTm", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.client.stateTm(ibcTest.clientId);
Expand All @@ -418,7 +418,7 @@ describe("IbcExtension", () => {
//
// describe("statesTm", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.client.statesTm();
Expand All @@ -436,7 +436,7 @@ describe("IbcExtension", () => {
//
// describe("allStatesTm", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.client.allStatesTm();
Expand All @@ -454,7 +454,7 @@ describe("IbcExtension", () => {
//
// describe("consensusStateTm", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.client.consensusStateTm(ibcTest.clientId);
Expand All @@ -469,7 +469,7 @@ describe("IbcExtension", () => {
// describe("connection", () => {
// describe("connection", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.connection.connection(ibcTest.connectionId);
Expand All @@ -483,7 +483,7 @@ describe("IbcExtension", () => {
//
// describe("connections", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.connection.connections();
Expand All @@ -497,7 +497,7 @@ describe("IbcExtension", () => {
//
// describe("allConnections", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.connection.allConnections();
Expand All @@ -509,7 +509,7 @@ describe("IbcExtension", () => {
//
// describe("clientConnections", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.connection.clientConnections(ibcTest.clientId);
Expand All @@ -523,7 +523,7 @@ describe("IbcExtension", () => {
//
// describe("clientState", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// const response = await client.ibc.connection.clientState(ibcTest.connectionId);
Expand All @@ -541,7 +541,7 @@ describe("IbcExtension", () => {
//
// describe("consensusState", () => {
// it("works", async () => {
// pendingWithoutSimapp42();
// pendingWithoutSimapp();
// const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
//
// // TODO: Find valid values
Expand Down
5 changes: 2 additions & 3 deletions packages/stargate/src/signingstargateclient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
ModifyingDirectSecp256k1HdWallet,
ModifyingSecp256k1HdWallet,
pendingWithoutSimapp,
pendingWithoutSimapp42,
simapp,
validator,
} from "./testutils.spec";
Expand Down Expand Up @@ -147,7 +146,7 @@ describe("SigningStargateClient", () => {

describe("sendIbcTokens", () => {
it("works with direct signing", async () => {
pendingWithoutSimapp42();
pendingWithoutSimapp();
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic);
const client = await SigningStargateClient.connectWithSigner(
simapp.tendermintUrl,
Expand Down Expand Up @@ -196,7 +195,7 @@ describe("SigningStargateClient", () => {
});

it("works with Amino signing", async () => {
pendingWithoutSimapp42();
pendingWithoutSimapp();
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
const client = await SigningStargateClient.connectWithSigner(
simapp.tendermintUrl,
Expand Down
4 changes: 3 additions & 1 deletion packages/stargate/src/stargateclient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ describe("StargateClient", () => {
secp256r1PubKey: null,
multisigPubKey: null,
accountNumber: validator.accountNumber,
sequence: validator.sequence,
// validator.sequence => 41, because gov module test.
// sequence: validator.sequence,
sequence: 41,
});

client.disconnect();
Expand Down
Loading