Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix test script #27

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
e2e: build build
yarn workspace dapp-agoric-orca-contract test; yarn workspace dapp-agoric-orca-contract build; yarn workspace dapp-agoric-orca-contract e2e
.DEFAULT_GOAL := build

e2e: build
make -C contract build e2e

build:
yarn workspace dapp-agoric-orca-contract test; yarn workspace dapp-agoric-orca-contract build;
yarn workspace dapp-agoric-orca-contract build

redeploy:
yarn workspace dapp-agoric-orca-contract deployc
test-orca:
yarn workspace dapp-agoric-orca-contract test
fund:
yarn workspace dapp-agoric-orca-contract fund
add-address:
yarn workspace dapp-agoric-orca-contract add:address
lint:
yarn workspace dapp-agoric-orca-contract lint
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@ This will fund the pool, provision the smart wallet, and will also fund `CLIENTA

This can be ran from the top-level directory
```
make fund
make -C contract fund-account
```

# Build & Deploy the dapp
From the top level directory, run:
```
make
yarn build
```

# Tests
From top-level directory:
```
make test-orca
yarn test
```

# tests from root directory
Expand Down Expand Up @@ -145,4 +145,4 @@ http://127.0.0.1:26657/abci_query?path=%22/cosmos.bank.v1beta1.Query/AllBalances
agd tx bank send keplr1 agoric15ch7da0d8nvqc8hk6dguq4ext0lvskpjcwm3patf8sygm63chmpqjlzt74 1000uist -y --chain-id agoriclocal
```

#
#
10 changes: 1 addition & 9 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,7 @@ src/orchdev.proposal.js
*/
```

5) possible import rejection SES
check for `bn.js` containing `while (j-- > 0) {`

we can check for this from outside the container:
```
kubectl exec -it agoriclocal-genesis-0 -- cat ./node_modules/bn.js/lib/bn.js | grep "j\-\-"
```

If the file is there, we can do `make copy-bn-js `
5) obsolete, left to not reset serial numbering

6)
```
Expand Down
38 changes: 11 additions & 27 deletions contract/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,6 @@ proposal-start-vote:
bundle-debug:
bash scripts/bundle-debug.sh

# patch
copy-bn-js:
kubectl exec -i agoriclocal-genesis-0 -c validator -- rm -f -v /root/node_modules/bn.js/lib/bn.js
cp ./PATCH-bn.js ../node_modules/bn.js/lib/bn.js
kubectl cp ../node_modules/bn.js/lib/bn.js default/agoriclocal-genesis-0:/root/node_modules/bn.js/lib/bn.js

copy-vow-js:
cp ./PATCH-vat.js ../node_modules/@agoric/vow/vat.js
kubectl cp ../node_modules/@agoric/vow/vat.js default/agoriclocal-genesis-0:/root/node_modules/@agoric/vow/vat.js
Expand All @@ -229,10 +223,6 @@ copy-vow-js:
# kubectl cp ../node_modules/@agoric/vow/vat.js default/agoriclocal-genesis-0:/root/node_modules/@agoric/async-flow/node_modules/@agoric/vow/vat.js


# kubectl exec -i agoriclocal-genesis-0 -c validator -- cat /root/node_modules/bn.js/lib/bn.js | grep "PATCH"
patch:
patch ../node_modules/bn.js/lib/bn.js < ../xxpatches/bn.js+5.2.1.patch

cleanc:
kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "rm -rf -v ./*"

Expand All @@ -244,29 +234,23 @@ deployc:
kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn node scripts/deploy-contract.js --install src/orca.contract.js --eval src/orca.proposal.js"
deploy:
yarn node scripts/deploy-contract.js --install src/orca.contract.js --eval src/orca.proposal.js
test-orca:
yarn test ./test/orca-contract.test.js


# todo remove clean install steps after debugging
e2e:
make clean
make cleanc
yarn cache clean
kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn cache clean"
kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "rm -rf -v /root/*"
# make clean
# make cleanc
# yarn cache clean
# kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn cache clean"
# kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "rm -rf -v /root/*"
yarn run build:deployer
make copy-project
kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn install"
kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn add @endo/[email protected]"
kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn add @agoric/[email protected]"
kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn add @agoric/[email protected]"
kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn add @agoric/[email protected]"
make copy-bn-js
kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn build:deployer"
kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn node scripts/deploy-contract.js --install src/orca.contract.js --eval src/orca.proposal.js"
# kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn add @endo/[email protected]"
# kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn add @agoric/[email protected]"
# kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn add @agoric/[email protected]"
# kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn add @agoric/[email protected]"
# kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn build:deployer"
kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn node scripts/deploy-contract.js --install src/orca.contract.js --eval src/orca.proposal.js"
# kubectl exec -i agoriclocal-genesis-0 -c validator -- bash -c "yarn node scripts/deploy-contract.js --install src/orca.contract.js --eval src/orca.proposal.js"
# todo: figure out why this sequence # is always off by 1 forcing a retry

lint:
yarn lint --fix-dry-run --ignore-pattern "*patch*"
4 changes: 1 addition & 3 deletions contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
"docker:make": "docker compose exec agd make -C /workspace/contract",
"make:help": "make list",
"start": "make clean start",
"start2": "make clean start2",
"build2": "yarn build:deployer2",
"build": "yarn build:deployer",
"build:deployer": "rollup -c rollup.config.mjs",
"build:deployer2": "echo \"deployer2\"; agoric run scripts/build-contract-deployer.js",
"deploy": "make dev-working",
"test": "ava",
"lint": "tsc && eslint '**/*.js'",
Expand Down
Loading