Skip to content

Commit

Permalink
Merge pull request #2169 from ecadlabs/lima-fix-tests
Browse files Browse the repository at this point in the history
fix(integration-tests): fix tests for lima
  • Loading branch information
roxaneletourneau authored Nov 29, 2022
2 parents 99facba + 40948b3 commit d5a2696
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions integration-tests/contract-estimation-tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, protocol, rpc }) =>
expect(estimate.minimalFeeMutez).toEqual(651);
expect(estimate.totalCost).toEqual(651);
expect(estimate.usingBaseFeeMutez).toEqual(651);
expect(estimate.consumedMilligas).toEqual(3148700);
expect(estimate.consumedMilligas).toEqual(3148786);
done();
})

Expand Down Expand Up @@ -198,7 +198,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, protocol, rpc }) =>
expect(estimate.minimalFeeMutez).toEqual(811);
expect(estimate.totalCost).toEqual(129311);
expect(estimate.usingBaseFeeMutez).toEqual(811);
expect(estimate.consumedMilligas).toEqual(4156370);
expect(estimate.consumedMilligas).toEqual(4156456);
done();
})

Expand Down Expand Up @@ -230,7 +230,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, protocol, rpc }) =>
expect(estimate.minimalFeeMutez).toEqual(698);
expect(estimate.totalCost).toEqual(79948);
expect(estimate.usingBaseFeeMutez).toEqual(698);
expect(estimate.consumedMilligas).toEqual(3559210);
expect(estimate.consumedMilligas).toEqual(3559296);
done();
})

Expand Down Expand Up @@ -258,7 +258,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, protocol, rpc }) =>
expect(estimate.minimalFeeMutez).toEqual(905);
expect(estimate.totalCost).toEqual(159405);
expect(estimate.usingBaseFeeMutez).toEqual(905);
expect(estimate.consumedMilligas).toEqual(4977390);
expect(estimate.consumedMilligas).toEqual(4977476);
// Do the actual operation
const op2 = await contract.methods.do(originate2()).send();
await op2.confirmation();
Expand Down
18 changes: 9 additions & 9 deletions integration-tests/contract-tx-rollup-batch-operation.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CONFIGS } from "./config";
import { OpKind } from "@taquito/taquito";

CONFIGS().forEach(({ lib, rpc, setup }) => {
CONFIGS().forEach(({ lib, rpc, setup, txRollupAddress }) => {
const Tezos = lib;

describe(`Test tx rollup batch using: ${rpc}`, () => {
Expand All @@ -13,9 +13,9 @@ CONFIGS().forEach(({ lib, rpc, setup }) => {
it('should succeed to submit a tx rollup batch with auto-estimate of the fees', async (done) => {
const op = await Tezos.contract.txRollupSubmitBatch({
content: '626c6f62',
rollup: 'txr1YTdi9BktRmybwhgkhRK7WPrutEWVGJT7w'
rollup: txRollupAddress
});
await op.confirmation(2)
await op.confirmation(2);
expect(op.hash).toBeDefined();
expect(op.content).toEqual('626c6f62');
expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY);
Expand All @@ -28,12 +28,12 @@ CONFIGS().forEach(({ lib, rpc, setup }) => {
it('should succeed to submit a tx rollup batch with defined fees', async (done) => {
const op = await Tezos.contract.txRollupSubmitBatch({
content: '626c6f62',
rollup: 'txr1YTdi9BktRmybwhgkhRK7WPrutEWVGJT7w',
rollup: txRollupAddress,
storageLimit: 6000,
gasLimit: 3000,
fee: 500
});
await op.confirmation(2)
await op.confirmation(2);
expect(op.hash).toBeDefined();
expect(op.content).toEqual('626c6f62');
expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY);
Expand All @@ -45,9 +45,9 @@ CONFIGS().forEach(({ lib, rpc, setup }) => {
it('should succeed to include a tx rollup batch operation in a batch', async (done) => {
const op = await Tezos.contract.batch([
{ kind: OpKind.TRANSACTION, to: 'tz1ZfrERcALBwmAqwonRXYVQBDT9BjNjBHJu', amount: 0.02 },
{ kind: OpKind.TX_ROLLUP_SUBMIT_BATCH, content: '626c6f62', rollup: 'txr1YTdi9BktRmybwhgkhRK7WPrutEWVGJT7w', }
{ kind: OpKind.TX_ROLLUP_SUBMIT_BATCH, content: '626c6f62', rollup: txRollupAddress, }
]).send();
await op.confirmation(2)
await op.confirmation(2);
expect(op.hash).toBeDefined();
expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY);
expect(op.status).toBe('applied');
Expand All @@ -58,9 +58,9 @@ CONFIGS().forEach(({ lib, rpc, setup }) => {
it('should succeed to include a tx rollup batch operation in a batch using `with` method', async (done) => {
const op = await Tezos.contract.batch()
.withTransfer({ to: 'tz1ZfrERcALBwmAqwonRXYVQBDT9BjNjBHJu', amount: 0.02 })
.withTxRollupSubmitBatch({ content: '626c6f62', rollup: 'txr1YTdi9BktRmybwhgkhRK7WPrutEWVGJT7w' })
.withTxRollupSubmitBatch({ content: '626c6f62', rollup: txRollupAddress })
.send();
await op.confirmation()
await op.confirmation();
expect(op.hash).toBeDefined();
expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY);
expect(op.status).toBe('applied');
Expand Down

0 comments on commit d5a2696

Please sign in to comment.