Adapt tests to wasmd v0.11.0-rc

This commit is contained in:
Simon Warta 2020-10-08 15:29:45 +02:00
parent a7645bff0e
commit 9967486f89
4 changed files with 22 additions and 14 deletions

View File

@ -387,6 +387,7 @@ describe("CosmWasmClient", () => {
it("can query existing key", async () => {
pendingWithoutWasmd();
pending("Raw query API is broken in v0.11.0-rc (https://github.com/CosmWasm/wasmd/issues/283)");
assert(contract);
const client = new CosmWasmClient(wasmd.endpoint);
@ -452,7 +453,10 @@ describe("CosmWasmClient", () => {
const client = new CosmWasmClient(wasmd.endpoint);
await client.queryContractSmart(contract.address, { broken: {} }).then(
() => fail("must not succeed"),
(error) => expect(error).toMatch(/query wasm contract failed: parsing hackatom::contract::QueryMsg/i),
(error) =>
expect(error).toMatch(
/query wasm contract failed: Error parsing into type hackatom::contract::QueryMsg: unknown variant/i,
),
);
});

View File

@ -307,6 +307,7 @@ describe("WasmExtension", () => {
describe("queryContractRaw", () => {
it("can query by key", async () => {
pendingWithoutWasmd();
pending("Raw query API is broken in v0.11.0-rc (https://github.com/CosmWasm/wasmd/issues/283)");
assert(hackatomContractAddress);
const client = makeWasmClient(wasmd.endpoint);
const raw = await client.wasm.queryContractRaw(hackatomContractAddress, hackatomConfigKey);
@ -350,7 +351,10 @@ describe("WasmExtension", () => {
const request = { nosuchkey: {} };
await client.wasm.queryContractSmart(hackatomContractAddress, request).then(
() => fail("shouldn't succeed"),
(error) => expect(error).toMatch(/query wasm contract failed: parsing hackatom::contract::QueryMsg/),
(error) =>
expect(error).toMatch(
/query wasm contract failed: Error parsing into type hackatom::contract::QueryMsg: unknown variant/,
),
);
});

View File

@ -42,11 +42,11 @@ describe("SigningCosmWasmClient", () => {
upload: {
amount: [
{
amount: "3140000",
amount: "4710000",
denom: "utest",
},
],
gas: "1000000",
gas: "1500000",
},
init: {
amount: [
@ -107,11 +107,11 @@ describe("SigningCosmWasmClient", () => {
upload: {
amount: [
{
amount: "25000",
amount: "37500",
denom: "ucosm",
},
],
gas: "1000000",
gas: "1500000",
},
init: {
amount: [
@ -173,11 +173,11 @@ describe("SigningCosmWasmClient", () => {
upload: {
amount: [
{
amount: "3140000",
amount: "4710000",
denom: "utest",
},
],
gas: "1000000",
gas: "1500000",
},
init: {
amount: [

View File

@ -56,12 +56,12 @@ function prepareBuilder(buider: string | undefined): string {
const defaultGasPrice = GasPrice.fromString("0.025ucosm");
const defaultGasLimits: GasLimits<CosmWasmFeeTable> = {
upload: 1005758,
init: 500000,
migrate: 200000,
exec: 200000,
send: 80000,
changeAdmin: 80000,
upload: 1_500_000,
init: 500_000,
migrate: 200_000,
exec: 200_000,
send: 80_000,
changeAdmin: 80_000,
};
export interface UploadMeta {