mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 13:47:12 +00:00
Add SIMAPP46_ENABLED/SLOW_SIMAPP46_ENABLED env variabled and add to CI
This commit is contained in:
parent
067147ec0d
commit
9b0478d425
@ -28,7 +28,7 @@ workflows:
|
||||
- build
|
||||
matrix:
|
||||
parameters:
|
||||
simapp: ["simapp42", "simapp44"]
|
||||
simapp: ["simapp42", "simapp44", "simapp46"]
|
||||
- test-node:
|
||||
requires:
|
||||
- build
|
||||
@ -159,6 +159,7 @@ jobs:
|
||||
command: |
|
||||
[ "<< parameters.simapp >>" = "simapp42" ] && export SIMAPP42_ENABLED=1 SLOW_SIMAPP42_ENABLED=1
|
||||
[ "<< parameters.simapp >>" = "simapp44" ] && export SIMAPP44_ENABLED=1 SLOW_SIMAPP44_ENABLED=1
|
||||
[ "<< parameters.simapp >>" = "simapp46" ] && export SIMAPP46_ENABLED=1 SLOW_SIMAPP46_ENABLED=1
|
||||
yarn test --stream
|
||||
- run:
|
||||
name: Run CLI selftest
|
||||
@ -178,6 +179,7 @@ jobs:
|
||||
command: |
|
||||
[ "<< parameters.simapp >>" = "simapp42" ] && export SIMAPP42_ENABLED=1 SLOW_SIMAPP42_ENABLED=1
|
||||
[ "<< parameters.simapp >>" = "simapp44" ] && export SIMAPP44_ENABLED=1 SLOW_SIMAPP44_ENABLED=1
|
||||
[ "<< parameters.simapp >>" = "simapp46" ] && export SIMAPP46_ENABLED=1 SLOW_SIMAPP46_ENABLED=1
|
||||
./run_examples.sh
|
||||
- run:
|
||||
name: Stop chains
|
||||
|
@ -7,8 +7,8 @@ import { Faucet } from "./faucet";
|
||||
import { TokenConfiguration } from "./tokenmanager";
|
||||
|
||||
function pendingWithoutSimapp(): void {
|
||||
if (!process.env.SIMAPP42_ENABLED && !process.env.SIMAPP44_ENABLED) {
|
||||
return pending("Set SIMAPP42_ENABLED or SIMAPP44_ENABLED to enabled Stargate node-based tests");
|
||||
if (!process.env.SIMAPP42_ENABLED && !process.env.SIMAPP44_ENABLED && !process.env.SIMAPP46_ENABLED) {
|
||||
return pending("Set SIMAPP{42,44,46}_ENABLED to enabled Stargate node-based tests");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,12 +19,12 @@ export function pendingWithoutLedger(): void {
|
||||
}
|
||||
|
||||
export function simappEnabled(): boolean {
|
||||
return !!process.env.SIMAPP42_ENABLED || !!process.env.SIMAPP44_ENABLED;
|
||||
return !!process.env.SIMAPP42_ENABLED || !!process.env.SIMAPP44_ENABLED || !!process.env.SIMAPP46_ENABLED;
|
||||
}
|
||||
|
||||
export function pendingWithoutSimapp(): void {
|
||||
if (!simappEnabled()) {
|
||||
return pending("Set SIMAPP42_ENABLED or SIMAPP44_ENABLED to enable Simapp-based tests");
|
||||
return pending("Set SIMAPP{42,44,46}_ENABLED to enable Simapp-based tests");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
defaultSigningClientOptions,
|
||||
faucet,
|
||||
makeRandomAddress,
|
||||
pendingWithoutSimapp44,
|
||||
pendingWithoutSimapp44Or46,
|
||||
simapp,
|
||||
simapp44Enabled,
|
||||
} from "../../testutils.spec";
|
||||
@ -79,7 +79,7 @@ describe("AuthzExtension", () => {
|
||||
|
||||
describe("grants", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutSimapp44();
|
||||
pendingWithoutSimapp44Or46();
|
||||
const [client, tmClient] = await makeClientWithAuthz(simapp.tendermintUrl);
|
||||
const response = await client.authz.grants(granter1Address, grantee1Address, "");
|
||||
expect(response.grants.length).toEqual(1);
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
faucet,
|
||||
nonNegativeIntegerMatcher,
|
||||
pendingWithoutSimapp,
|
||||
pendingWithoutSimapp44,
|
||||
pendingWithoutSimapp44Or46,
|
||||
simapp,
|
||||
simappEnabled,
|
||||
validator,
|
||||
@ -171,7 +171,7 @@ describe("gov messages", () => {
|
||||
|
||||
describe("MsgVoteWeighted", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutSimapp44(); // MsgVoteWeighted does not yet exist in Cosmos SDK 0.42
|
||||
pendingWithoutSimapp44Or46(); // MsgVoteWeighted does not yet exist in Cosmos SDK 0.42
|
||||
assert(voterWallet);
|
||||
assert(proposalId, "Missing proposal ID");
|
||||
const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, voterWallet);
|
||||
@ -204,7 +204,7 @@ describe("gov messages", () => {
|
||||
});
|
||||
|
||||
it("works with Amino JSON sign mode", async () => {
|
||||
pendingWithoutSimapp44(); // MsgVoteWeighted does not yet exist in Cosmos SDK 0.42
|
||||
pendingWithoutSimapp44Or46(); // MsgVoteWeighted does not yet exist in Cosmos SDK 0.42
|
||||
assert(voterWalletAmino);
|
||||
assert(proposalId, "Missing proposal ID");
|
||||
const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, voterWalletAmino);
|
||||
|
@ -23,13 +23,17 @@ export function simapp44Enabled(): boolean {
|
||||
return !!process.env.SIMAPP44_ENABLED;
|
||||
}
|
||||
|
||||
export function simappEnabled(): boolean {
|
||||
return simapp42Enabled() || simapp44Enabled();
|
||||
export function simapp46Enabled(): boolean {
|
||||
return !!process.env.SIMAPP46_ENABLED;
|
||||
}
|
||||
|
||||
export function pendingWithoutSimapp44(): void {
|
||||
if (!simapp44Enabled()) {
|
||||
return pending("Set SIMAPP44_ENABLED to enable Simapp based tests");
|
||||
export function simappEnabled(): boolean {
|
||||
return simapp42Enabled() || simapp44Enabled() || simapp46Enabled();
|
||||
}
|
||||
|
||||
export function pendingWithoutSimapp44Or46(): void {
|
||||
if (!simapp44Enabled() && !simapp46Enabled()) {
|
||||
return pending("Set SIMAPP{44,46}_ENABLED to enable Simapp based tests");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,8 @@ module.exports = [
|
||||
SLOW_SIMAPP42_ENABLED: "",
|
||||
SIMAPP44_ENABLED: "",
|
||||
SLOW_SIMAPP44_ENABLED: "",
|
||||
SIMAPP46_ENABLED: "",
|
||||
SLOW_SIMAPP46_ENABLED: "",
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user