Add SIMAPP46_ENABLED/SLOW_SIMAPP46_ENABLED env variabled and add to CI

This commit is contained in:
Simon Warta 2022-07-06 11:28:51 +02:00
parent 067147ec0d
commit 9b0478d425
7 changed files with 23 additions and 15 deletions

View File

@ -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

View File

@ -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");
}
}

View File

@ -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");
}
}

View File

@ -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);

View File

@ -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);

View File

@ -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");
}
}

View File

@ -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"],