Skip to content

Commit

Permalink
chore: make all test run on dir
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Meier <[email protected]>
  • Loading branch information
n0izn0iz committed Jan 21, 2024
1 parent 8630979 commit 66134e9
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 97 deletions.
32 changes: 32 additions & 0 deletions packages/scripts/integration-testing/simpleTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { program } from "commander";
import fs from "fs/promises";

import { buildCosmos, startCosmosLocalnet } from "./cosmos";
import { teritoriLocalnetNetwork } from "../../networks/teritori-localnet";
import { deployTeritoriEcosystem } from "../network-setup/deployLib";

const main = async () => {
program.argument(
"<repo-path>",
"Path to the repo to build latest binary from",
);
program.parse();
const [repoPath] = program.args;

const binary = await buildCosmos(repoPath, "teritorid");

const { home, kill } = await startCosmosLocalnet(binary);

await deployTeritoriEcosystem(
{ binaryPath: binary, home },
teritoriLocalnetNetwork.id,
"testnet-adm",
);

// stop
await kill();

await fs.rm(home, { recursive: true, force: true });
};

main();
28 changes: 0 additions & 28 deletions packages/scripts/integration-testing/simpleTest204.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { program } from "commander";
import fs from "fs/promises";
import path from "path";

import {
buildBinaries,
buildCosmos,
startCosmosLocalnet,
upgradeCosmosLocalnet,
} from "./cosmos";
Expand All @@ -13,14 +15,22 @@ import { deployTeritoriEcosystem } from "../network-setup/deployLib";
const repoURL = "https://github.com/TERITORI/teritori-chain.git";

const main = async () => {
program.argument(
"<repo-path>",
"Path to the repo to build latest binary from",
);
program.parse();
const [repoPath] = program.args;

const binaries = await buildBinaries(repoURL, "teritorid", [
"v1.2.0",
"v1.3.0",
"v1.3.1",
"v1.4.2",
"v2.0.4",
] as const);

const v204Binary = await buildCosmos(repoPath, "teritorid");

const {
home,
validatorWalletName,
Expand Down Expand Up @@ -71,14 +81,14 @@ const main = async () => {
`minimum-gas-prices = "0stake"`,
);

const { kill: killv204 } = await startCosmosLocalnet(binaries["v2.0.4"], {
const { kill: killv204 } = await startCosmosLocalnet(v204Binary, {
home,
height: upgradeHeight,
});

// test cosmwasm
await deployTeritoriEcosystem(
{ binaryPath: binaries["v2.0.4"], home },
{ binaryPath: v204Binary, home },
teritoriLocalnetNetwork.id,
"testnet-adm",
);
Expand Down
66 changes: 0 additions & 66 deletions packages/scripts/integration-testing/upgradeTest142to204.ts

This file was deleted.

7 changes: 7 additions & 0 deletions packages/scripts/integration-testing/upgradeTest142toDir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ const main = async () => {
validatorWalletName,
} = await startCosmosLocalnet(binaries["v1.4.2"]);

// deploy
await deployTeritoriEcosystem(
{ binaryPath: binaries["v1.4.2"], home },
teritoriLocalnetNetwork.id,
"testnet-adm",
);

const upgradeHeight = await upgradeCosmosLocalnet(
binaries["v1.4.2"],
"v2.0.0",
Expand Down

0 comments on commit 66134e9

Please sign in to comment.