Skip to content

Commit

Permalink
Fixes #1376, e2e tests config cleanup (#1540)
Browse files Browse the repository at this point in the history
* removed unused config files and skipped tests depending on them

* removed skipped tests or refactored them if still valid. Removed a bunch of config.json files as well

* removed single thread for testing

* added logging for transfer test

* logging for account listing

* removing deleted files which I accidentally merged back in during update from main

* updated to use modern config.json files

* updated bad URL tests

* updated network name test

* WIP for storage string test json

* completed modernizing storage string json

* low tez test refactor

* pinning node version in main.yml and updated to modern taquito test json

* slight node version bump

* trying to update to v18 for node

* trying to rebuild before running all other commands

* added git clean to setup script

* more testing for CI

* removed CI stuff

* checking NPM registry for CI job

* removed logging

* added docker build back to caching

* updated ports in each file to be sequential

* updated tests for config changes

* making CI use the 20000 port for taquito flextesa tests

* updated help for correct port number

* logging for CI debugging

* added logging to see what ports are in use on the machine when the test runs

* more verbose logging for docker

* adding more logging for docker containers

* more logging

* adding wait for containers to start up

* more logging for scaffold flextesa image

* added logging to see what is on port 20000

* seeing all ports

* removed chunking from tests

* removed lsof call in test

* updated scaffold sandbox to have scaffold in name to help with identification

* updated test with param to actually test something

* logging for images in new test

* updated util method to get all container IDs

* updated test to use unique sandbox name

* removed long name

* removed only from test

* logging for scaffold tests

* added logging for setup

* upped the timeout time for scaffold tests

* added ports to taquito flextesa to prevent collisions

* putting chunks back in

* mac mini update, I undo'd too far

* updated env var in test

* removing final check to see if container stopped since it can give a false fail in CI

* moving away from local to local-tf for uniqueness checking in tests

* made sandbox name into localTF for taquito-flextesa

* upped test timeout to 10 minutes

* removing logging for testing

* put single worker back in

* going back to parallel workers

* removed unused variable

* removing update to the timeout limit

* logging for taquito flextesa tests

* added max workers=2

* putting max workers back to 1

* Refactored scaffold task to resolve memory leaks. However, there are still some present

* Committing work thus far

* Fixed problem with memory leaks for the scaffold task

* updated test command to not use detect commands and not use CI flag

* added wait for stopping flextesa container

* logging for CI

* upped timeout and making tests not verbose

* added waiting for flextesa sandbox to finish booting up

* removing all console.log messages in tests due to popular demand https://ecadlabs.slack.com/archives/C021J32T05B/p1669155878414139

* upped the test timeout

* removing bad assertiong that has no point

* cleaning up unused variable

* Fixed problem with E2E tests not running correctly

Co-authored-by: Alexander Zbusko <alexander.zbusko@gmail.com>
Co-authored-by: Houston <32914364+hu3man@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 23, 2022
1 parent bc8c440 commit 86359f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/e2e/taqueria-plugin-taquito-flextesa.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,14 @@ describe('E2E Testing for taqueria taquito plugin', () => {
await fsPromises.readFile(`${taqueriaProjectPath}/.taq/config.json`, { encoding: 'utf-8' }),
);
const localURL = configContents.sandbox.localTF.rpcUrl;
const beforeAmount = checkContractBalanceOnNetwork(contractHash, localURL);
const beforeAmount = await checkContractBalanceOnNetwork(contractHash, localURL);

// 6. Call taq call command to transfer 0 tez from account to the contract
await exec(`taq call ${contractHash} --param hello-tacos.parameter.decrement_by_1.tz`, {
cwd: `./${taqueriaProjectPath}`,
});

const afterAmount = checkContractBalanceOnNetwork(contractHash, localURL);
const afterAmount = await checkContractBalanceOnNetwork(contractHash, localURL);

// 8. Verify that amount was not charged
expect(beforeAmount).toStrictEqual(afterAmount);
Expand Down
6 changes: 3 additions & 3 deletions tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"scripts": {
"test:unit": "npm run test:unit:deno && npm run test:unit:jest",
"test:unit:deno": "TEST=true deno test unit/ --allow-all --unstable --import-map ../import_map.json",
"test:unit:jest": "TEST=true jest --config jest.config.unit.ts --no-cache --detectOpenHandles --detectLeaks --ci",
"test:unit:jest": "TEST=true jest --config jest.config.unit.ts --no-cache --detectOpenHandles --detectLeaks",
"test:unit:deno:debug": "TEST=true deno test unit/ --allow-all --unstable --inspect-brk",
"test:unit:deno:with-coverage": "TEST=true deno test unit/ --allow-all --unstable --coverage=coverage_report && deno coverage coverage_report && deno coverage coverage_report --lcov > coverage_profile.lcov",
"test:unit:selected": "TEST=true deno test unit/taqueria-utils/taqueria-utils.test.ts --allow-all --unstable --coverage=coverage_report && deno coverage coverage_report",
"test:integration": "TEST=true jest --config jest.config.integration.ts --no-cache",
"test:e2e": "TEST=true jest --config jest.config.e2e.ts"
"test:integration": "TEST=true jest --config jest.config.integration.ts --no-cache --detectOpenHandles --detectLeaks",
"test:e2e": "TEST=true jest --config jest.config.e2e.ts --detectOpenHandles --detectLeaks"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 86359f5

Please sign in to comment.