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: Restore upgrade testing suite for v3.x line #789

Merged
merged 251 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
251 commits
Select commit Hold shift + click to select a range
defe327
chore: updated anteHandler and postHandler
vishal-kanna Aug 28, 2024
5e33e65
chore: use replace for feemarket in go.mod
vishal-kanna Aug 28, 2024
d5667f0
chore: changed go version in docker file
vishal-kanna Aug 29, 2024
8684ce9
fix : fix testing in antehandler
vishal-kanna Aug 29, 2024
ea06beb
fix: fix lint issues
vishal-kanna Aug 29, 2024
d09e816
chore: updated antehandler
vishal-kanna Aug 29, 2024
adcd9f3
fix: fix lint issues
vishal-kanna Aug 29, 2024
e2f6a74
fix: fix lint issues
vishal-kanna Aug 29, 2024
f016460
fix: lint issus
vishal-kanna Aug 29, 2024
36202e4
chore: updated ante and fix test cases
vishal-kanna Aug 30, 2024
945b3cc
fix: gofumt errors
vishal-kanna Aug 30, 2024
74089c2
fix: golint issues
vishal-kanna Aug 30, 2024
4256d7f
chore: updated postHandler
vishal-kanna Aug 30, 2024
acd8d74
testing
vishal-kanna Sep 3, 2024
4779b6a
chore: added test cases
vishal-kanna Sep 4, 2024
9557978
fix
vishal-kanna Sep 4, 2024
044bc3d
fix
vishal-kanna Sep 4, 2024
b2b8502
fix: golint issues
vishal-kanna Sep 4, 2024
e2866fb
fix : fix testcase
vishal-kanna Sep 5, 2024
9bcd0cb
fix: fix lint issues
vishal-kanna Sep 5, 2024
64c505d
disable update tests
vishal-kanna Sep 5, 2024
b05f6ee
disable report test
vishal-kanna Sep 5, 2024
9af6f82
fix: added response check in tests
vishal-kanna Sep 5, 2024
6181458
fix
vishal-kanna Sep 5, 2024
33403e1
chore: added param subsace for feemarket
vishal-kanna Sep 6, 2024
05fa0ec
addressed review comments
vishal-kanna Sep 10, 2024
281af5e
chore: merged feemarket integration PR
vishal-kanna Sep 10, 2024
0c5a67b
fix
vishal-kanna Sep 10, 2024
1fd19a2
fix
vishal-kanna Sep 10, 2024
cb727e6
fix
vishal-kanna Sep 10, 2024
611e181
TODO in app.go
vishal-kanna Sep 10, 2024
af939e1
fix: golint error
vishal-kanna Sep 10, 2024
0b9c29d
feat: add msg mint
atheeshp Sep 11, 2024
26b329e
fix lint
atheeshp Sep 11, 2024
94c9671
chore: added tests for mintMsg
vishal-kanna Sep 18, 2024
15b751a
Temporarily disabled upgrade test runs + references
Eengineer1 Sep 18, 2024
9a64ed4
chore: added upgradeHandler and upgraded the store loader
vishal-kanna Sep 19, 2024
bd49157
Merge branch 'vishal/integrate-antehandler' of https://github.com/che…
vishal-kanna Sep 19, 2024
fbb36f0
fix: resolve merge conflicts
vishal-kanna Sep 20, 2024
b10b3ab
chore: added integration test for mint msg
vishal-kanna Sep 20, 2024
4234601
resolve merge conflicts
vishal-kanna Sep 20, 2024
3f01b70
fix: gofumpt issue
vishal-kanna Sep 20, 2024
e143aba
fix: lint issue
vishal-kanna Sep 21, 2024
cd181d3
Merge branch 'develop' into ap/add-mint-msg
Eengineer1 Sep 24, 2024
c2d1d20
Removed stale replacement statement
Eengineer1 Sep 24, 2024
10a9586
merged and added tests
vishal-kanna Sep 26, 2024
c22eb8c
fixes
vishal-kanna Sep 26, 2024
f9ba7ad
fix
vishal-kanna Sep 26, 2024
58fdd4e
testing
vishal-kanna Sep 26, 2024
e987f8a
lint fix
vishal-kanna Sep 26, 2024
8c53ff1
fix
vishal-kanna Sep 26, 2024
eb089bc
remove build tag
vishal-kanna Sep 26, 2024
9b65ab6
fix:gas issue
vishal-kanna Sep 26, 2024
cd6e266
fix tests
vishal-kanna Sep 26, 2024
8c25835
fix: fix lint
vishal-kanna Sep 26, 2024
9a2dc93
added gobuild tag
vishal-kanna Sep 26, 2024
1b70699
testing
vishal-kanna Sep 28, 2024
57a8e3b
fix: lint fix
vishal-kanna Sep 28, 2024
20cb776
testing
vishal-kanna Sep 28, 2024
5eb8fc3
reverted setup.sh
vishal-kanna Sep 28, 2024
d1e6e09
reverted scripts
vishal-kanna Sep 28, 2024
565d092
reverted gobuild tags
vishal-kanna Sep 28, 2024
1252b1b
testing
vishal-kanna Sep 28, 2024
d4a75f0
testing
vishal-kanna Sep 28, 2024
e16a42f
testing
vishal-kanna Sep 28, 2024
b8ef9e3
testing
vishal-kanna Sep 28, 2024
47af247
test
atheeshp Sep 30, 2024
fdfac47
try fixing mint
atheeshp Sep 30, 2024
e719375
try fixing test
atheeshp Sep 30, 2024
cf65e38
try fix
atheeshp Sep 30, 2024
13ae92c
try fix
atheeshp Sep 30, 2024
b70c187
try fix
atheeshp Oct 1, 2024
f51a70a
try trace
atheeshp Oct 1, 2024
1581142
testing
vishal-kanna Oct 1, 2024
9c4759f
testing
vishal-kanna Oct 1, 2024
ae37fdd
try fix
atheeshp Oct 1, 2024
840bd87
testing
vishal-kanna Oct 1, 2024
88f8e60
try fix
atheeshp Oct 1, 2024
0f21b0a
testing
vishal-kanna Oct 1, 2024
9d5ad02
fix tests
atheeshp Oct 1, 2024
07d9ac5
fix tests
atheeshp Oct 1, 2024
d5beb9e
try fix
atheeshp Oct 1, 2024
9440b8c
try fix
atheeshp Oct 1, 2024
2772e16
fix lint
atheeshp Oct 1, 2024
706e57a
push integartion build
atheeshp Oct 1, 2024
b373a07
keys tests
atheeshp Oct 1, 2024
289eeba
add query
atheeshp Oct 1, 2024
e1c6fbd
lint
atheeshp Oct 1, 2024
e67189f
Merge branch 'develop' into ap/add-mint-msg
Eengineer1 Oct 1, 2024
0ada929
go build tag
vishal-kanna Oct 1, 2024
44e8513
try fix
atheeshp Oct 1, 2024
be68b42
cheqd home
atheeshp Oct 1, 2024
f68bbd9
added keys query
vishal-kanna Oct 1, 2024
f2af8ff
lint-fix
vishal-kanna Oct 1, 2024
fd2bbc7
testing
vishal-kanna Oct 2, 2024
cebfea0
home flag
vishal-kanna Oct 2, 2024
eb566bb
added logs
vishal-kanna Oct 2, 2024
3bf2eed
testing
vishal-kanna Oct 2, 2024
1222a67
testing
vishal-kanna Oct 2, 2024
936dd08
testing
vishal-kanna Oct 2, 2024
e9755ec
testing
vishal-kanna Oct 2, 2024
f070293
tests
atheeshp Oct 2, 2024
84a1ccf
add git flow
atheeshp Oct 2, 2024
fde2f69
try fix
atheeshp Oct 2, 2024
f50de7e
try fix
atheeshp Oct 2, 2024
71646ef
docker
atheeshp Oct 2, 2024
515a0b1
mainnet
atheeshp Oct 2, 2024
10d32c3
remove keys list
atheeshp Oct 2, 2024
7a04fd4
fix setup
atheeshp Oct 3, 2024
35a6152
fix
atheeshp Oct 3, 2024
f1f2edc
ci
atheeshp Oct 3, 2024
92ef6cc
ci
atheeshp Oct 3, 2024
16e9cae
ci
atheeshp Oct 3, 2024
d26f66b
remove home path
atheeshp Oct 3, 2024
b5c06ce
tests
atheeshp Oct 3, 2024
f12a359
tests
atheeshp Oct 3, 2024
c3168a5
tests
atheeshp Oct 3, 2024
2fa8787
ci
atheeshp Oct 3, 2024
c09c7a5
tests
atheeshp Oct 3, 2024
5c3aaef
add home
atheeshp Oct 3, 2024
4eaa1c2
changes
atheeshp Oct 3, 2024
8823fe0
changes
atheeshp Oct 3, 2024
eb51c52
try fix
atheeshp Oct 4, 2024
94f7d68
try fix
atheeshp Oct 7, 2024
4fdfd30
fix test
atheeshp Oct 7, 2024
952d1cb
testing
vishal-kanna Oct 7, 2024
687fb12
testing
vishal-kanna Oct 7, 2024
7e55dcc
testing
vishal-kanna Oct 7, 2024
52de63f
fix lint
vishal-kanna Oct 7, 2024
5ea0354
fix
vishal-kanna Oct 7, 2024
b7b9149
restored build tag
vishal-kanna Oct 7, 2024
71cd48b
testing
vishal-kanna Oct 7, 2024
68f6280
fix
vishal-kanna Oct 7, 2024
163618e
added queryBalance to test minting
vishal-kanna Oct 7, 2024
ba8ef3f
buildtag
vishal-kanna Oct 7, 2024
2715643
fix
vishal-kanna Oct 7, 2024
2ddd0b1
chore: addressed review comments
vishal-kanna Oct 7, 2024
39abf0c
nits
vishal-kanna Oct 7, 2024
87730c1
nit
vishal-kanna Oct 7, 2024
d871bde
chore: fix tests
vishal-kanna Oct 7, 2024
3d44a08
Merge branch 'ap/add-mint-msg' into ap/fix-mint
atheeshp Oct 7, 2024
30539ed
revert
vishal-kanna Oct 7, 2024
e7674e4
Merge branch 'ap/fix-mint' of https://github.com/cheqd/cheqd-node int…
vishal-kanna Oct 7, 2024
7da5c30
Merge branch 'ap/add-mint-msg' into vishal/upgradeHandler
atheeshp Oct 7, 2024
bda9d8c
Merge branch 'vishal/upgradeHandler' of https://github.com/cheqd/cheq…
vishal-kanna Oct 7, 2024
53b455f
reverted functions
vishal-kanna Oct 7, 2024
3cc7acd
uncommented upgrade tests
vishal-kanna Oct 8, 2024
3e82807
chore: added module version for feemarket and feeabs
vishal-kanna Oct 8, 2024
f634102
reordered versionmaps
vishal-kanna Oct 8, 2024
bcbac2d
testing
vishal-kanna Oct 8, 2024
a728a39
testing
vishal-kanna Oct 8, 2024
796d22c
build tag
vishal-kanna Oct 8, 2024
9b8c1b3
testing
vishal-kanna Oct 8, 2024
dd16eb2
testing
vishal-kanna Oct 8, 2024
cd57c72
testing
vishal-kanna Oct 8, 2024
a266ee3
Merge branch 'develop' of https://github.com/cheqd/cheqd-node into vi…
vishal-kanna Oct 8, 2024
12cdc2e
testing
vishal-kanna Oct 8, 2024
8a4a8c1
changed balances
vishal-kanna Oct 8, 2024
92026ae
reverted balances
vishal-kanna Oct 8, 2024
477e2b4
feemarketParams
vishal-kanna Oct 8, 2024
2973aab
updated to v3
vishal-kanna Oct 8, 2024
4cdb1cd
fix
vishal-kanna Oct 8, 2024
9132ef9
updated old scripts
vishal-kanna Oct 8, 2024
fc448be
testing
vishal-kanna Oct 8, 2024
f942769
testing
vishal-kanna Oct 9, 2024
e8c55c8
testing
vishal-kanna Oct 9, 2024
166f71c
remove build tag
vishal-kanna Oct 9, 2024
6a6440c
commented validator3
vishal-kanna Oct 9, 2024
88c5b13
changed voting period
vishal-kanna Oct 9, 2024
3110579
build tag
vishal-kanna Oct 9, 2024
12c9cb9
testing
vishal-kanna Oct 9, 2024
df29294
query
vishal-kanna Oct 9, 2024
f9b8539
voting period
vishal-kanna Oct 9, 2024
d840dd4
testing
vishal-kanna Oct 9, 2024
f4d2103
testing
vishal-kanna Oct 9, 2024
5d99a10
testing
vishal-kanna Oct 9, 2024
cf6c3b6
testing
vishal-kanna Oct 9, 2024
4837e43
testing
vishal-kanna Oct 9, 2024
157b4a9
testing
vishal-kanna Oct 9, 2024
8068050
testing
vishal-kanna Oct 9, 2024
6c63f4c
testing
vishal-kanna Oct 9, 2024
9d0aa9e
testing
vishal-kanna Oct 9, 2024
a067e5b
testing
vishal-kanna Oct 9, 2024
6f5493e
testing
vishal-kanna Oct 9, 2024
c175faa
Merge branch 'develop' into vishal/upgradeHandler
Eengineer1 Oct 9, 2024
cdc972e
removed print statement
vishal-kanna Oct 10, 2024
f0def9a
lint fix
vishal-kanna Oct 10, 2024
0491915
chore: addressed review comments
vishal-kanna Oct 10, 2024
98cfcef
restored GetproposalID func
vishal-kanna Oct 10, 2024
765e1d8
restored function
vishal-kanna Oct 10, 2024
244072f
fix: lint
vishal-kanna Oct 10, 2024
392bc68
restored paramchange in github workflows
vishal-kanna Oct 10, 2024
6787532
Removed trailing space
Eengineer1 Oct 10, 2024
3d9016a
testing
vishal-kanna Oct 10, 2024
fa40004
Merge branch 'vishal/upgradeHandler' of https://github.com/cheqd/cheq…
vishal-kanna Oct 10, 2024
2a3cde1
uncommented pricing proposal jobs
vishal-kanna Oct 10, 2024
3a5f98a
testing
vishal-kanna Oct 10, 2024
3fd5c92
testing
vishal-kanna Oct 10, 2024
e75a5e5
testing
vishal-kanna Oct 10, 2024
13ce3fa
fix : lint
vishal-kanna Oct 10, 2024
864fa48
testing
vishal-kanna Oct 10, 2024
a686794
testing
vishal-kanna Oct 10, 2024
a068bb3
testing
vishal-kanna Oct 10, 2024
f849688
testing
vishal-kanna Oct 10, 2024
b8d7bb0
testing
vishal-kanna Oct 10, 2024
eb58b54
fix:lint
vishal-kanna Oct 10, 2024
623a9b8
testing
vishal-kanna Oct 10, 2024
484f699
testing
vishal-kanna Oct 10, 2024
1146a20
testing
vishal-kanna Oct 10, 2024
fff0af0
testing
vishal-kanna Oct 10, 2024
4d77b8b
testing
vishal-kanna Oct 10, 2024
6c57f3a
increase timeout
vishal-kanna Oct 10, 2024
bb8262d
testing
vishal-kanna Oct 10, 2024
a881229
testing
vishal-kanna Oct 10, 2024
09ff51b
added upgrade tests
vishal-kanna Oct 10, 2024
874818c
fix:lint
vishal-kanna Oct 10, 2024
981bc40
added module version map
vishal-kanna Oct 10, 2024
7fc78c5
chore: added balance check after minting
vishal-kanna Oct 11, 2024
cac0526
Merge branch 'develop' of https://github.com/cheqd/cheqd-node into vi…
vishal-kanna Oct 11, 2024
96776c2
fix
vishal-kanna Oct 11, 2024
c400191
Enhanced report inclusion
Eengineer1 Oct 11, 2024
693c531
Removed redundant
Eengineer1 Oct 11, 2024
317abc2
Restored relationships
Eengineer1 Oct 11, 2024
bbfb654
Merge branch 'develop' into vishal/upgradeHandler
Eengineer1 Oct 14, 2024
11b9ad3
Aligned v3 with v2 + removed redundancy
Eengineer1 Oct 14, 2024
09d3ad0
Added intermediate block producal periods
Eengineer1 Oct 14, 2024
d09a679
Added extra overhead
Eengineer1 Oct 14, 2024
1f18f6b
Adjusted literals + dynamic identifiers
Eengineer1 Oct 14, 2024
5a6c497
Removed redundant
Eengineer1 Oct 14, 2024
59f94f0
Debug
Eengineer1 Oct 14, 2024
939a273
Debug v2
Eengineer1 Oct 14, 2024
f07496b
Enhanced coded registry
Eengineer1 Oct 14, 2024
5dad542
Added directive
Eengineer1 Oct 14, 2024
065c626
Debug v3
Eengineer1 Oct 14, 2024
ea55b2c
Debug
Eengineer1 Oct 14, 2024
9859875
Switched to constant since given order of precedence
Eengineer1 Oct 14, 2024
fda8e25
chore: added query to extract address
vishal-kanna Oct 15, 2024
04a2d1f
debug
vishal-kanna Oct 15, 2024
f31457b
reduce waiting time
vishal-kanna Oct 15, 2024
9cc827f
reduce waiting period
vishal-kanna Oct 15, 2024
818cbef
debug
vishal-kanna Oct 15, 2024
197c1d6
reduce waiting time
vishal-kanna Oct 15, 2024
a166e53
debug
vishal-kanna Oct 15, 2024
14c5325
debug
vishal-kanna Oct 15, 2024
3b4cbba
debug
vishal-kanna Oct 15, 2024
e906939
debug
vishal-kanna Oct 15, 2024
8ad3db8
debug
vishal-kanna Oct 15, 2024
d92a61b
debug
vishal-kanna Oct 15, 2024
c5284a4
fix: Added explicit did module account permission setter within upgra…
vishal-kanna Oct 16, 2024
7be9544
Removed prints
Eengineer1 Oct 16, 2024
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
313 changes: 153 additions & 160 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ permissions:
checks: write

jobs:

installer-cosmovisor:
name: "Installer - Cosmovisor mode"
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -165,145 +164,141 @@ jobs:
name: report-integration.xml
path: report-integration.xml

# NOTE: This job is disabled since upgrade tests from v0.6.x to v1.x.x are not needed until next major release.
# upgrade-tests:
# name: "Upgrade Tests"
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v4

# # Preparations

# - name: Download old node binary (mainnet-latest)
# run: |
# mkdir -p ${{ env.RUNNER_BIN_DIR }}
# wget -c https://github.com/cheqd/cheqd-node/releases/download/v"${LEGACY_VERSION}"/cheqd-noded-"${LEGACY_VERSION}"-linux-amd64.tar.gz
# tar -xvf cheqd-noded-"${LEGACY_VERSION}"-linux-amd64.tar.gz -C ${{ env.RUNNER_BIN_DIR }}
# sudo chmod +x ${{ env.RUNNER_BIN_DIR }}/cheqd-noded
# env:
# LEGACY_VERSION: 1.4.5

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

# - uses: actions/setup-go@v5
# with:
# go-version-file: ./go.mod
# cache: true

# - name: Install ginkgo
# working-directory: ./..
# run: go install github.com/onsi/ginkgo/v2/ginkgo@latest

# - name: Download new version of the Docker image (build-latest)
# uses: actions/download-artifact@v4
# with:
# name: cheqd-node-build.tar

# - name: Load node Docker image
# run: docker load -i cheqd-node-build.tar

# # Run tests
# - name: Setting up network with old binary inside (mainnet version)
# working-directory: ./tests/upgrade/integration
# run: |
# bash scripts/old_binary_setup.sh

# - name: Run pre-upgrade tests
# working-directory: ./tests/upgrade/integration/v2
# run: |
# ginkgo -r --race --tags upgrade_integration --focus-file pre_test.go --keep-going --trace --junit-report ../../../../report-pre-upgrade.xml

# - name: Upload pre-upgrade tests result
# uses: actions/upload-artifact@v4
# with:
# name: report-pre-upgrade.xml
# path: report-pre-upgrade.xml

# - name: Restart network using new node version (build-latest)
# working-directory: ./tests/upgrade/integration
# run: |
# bash scripts/upgrade.sh

# - name: Verifying docker processes
# working-directory: ./tests/upgrade/integration
# run: |
# docker ps -a

# - name: Run post-upgrade tests
# working-directory: ./tests/upgrade/integration/v2
# run: |
# ginkgo -r --race --tags upgrade_integration --focus-file post_test.go --keep-going --trace --junit-report ../../../../report-post-upgrade.xml

# - name: Upload post-upgrade tests result
# uses: actions/upload-artifact@v4
# with:
# name: report-post-upgrade.xml
# path: report-post-upgrade.xml

# - name: Download binary artifact (build-latest)
# uses: actions/download-artifact@v4
# id: download
# with:
# name: cheqd-noded
# path: ${{ env.RUNNER_BIN_DIR }}

# - name: Restore binary permissions
# run: sudo chmod +x ${{ env.RUNNER_BIN_DIR }}/cheqd-noded

# - name: Run integration tests on upgraded network
# working-directory: ./tests/integration
# run: |
# ginkgo -r --tags integration --race --randomize-suites --keep-going --trace --junit-report ../../report-upgraded-integration.xml

# - name: Upload post-upgrade integration tests result
# uses: actions/upload-artifact@v4
# with:
# name: report-upgraded-integration.xml
# path: report-upgraded-integration.xml

# - name: Show logs on failure
# if: failure()
# working-directory: ./docker/localnet
# run: docker compose --env-file build-latest.env logs --tail --follow

# - name: Submit governance fee parameter change proposals
# working-directory: ./tests/upgrade/integration/v2
# run: |
# ginkgo -r --race --tags upgrade_integration --focus-file param_change_proposal_test.go --keep-going --trace --junit-report ../../../../report-pricing-proposal.xml

# - name: Upload pricing proposal tests result
# uses: actions/upload-artifact@v4
# with:
# name: report-pricing-proposal.xml
# path: report-pricing-proposal.xml

# - name: Run pricing integration tests after successful param change proposal
# working-directory: ./tests/integration
# run: |
# ginkgo -r --tags integration --race --randomize-suites --keep-going --trace --skip-file cli_diddoc_test.go --skip-file cli_diddoc_negative_test.go --skip-file cli_resource_test.go --skip-file cli_resource_negative_test.go --junit-report ../../report-pricing-change.xml

# - name: Upload pricing change tests result
# uses: actions/upload-artifact@v4
# with:
# name: report-pricing-change.xml
# path: report-pricing-change.xml

# - name: Cleanup after tests
# working-directory: ./tests/upgrade/integration
# run: |
# bash scripts/cleanup.sh
upgrade-tests:
name: "Upgrade Tests"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4

- name: Download old node binary (mainnet-latest)
run: |
mkdir -p ${{ env.RUNNER_BIN_DIR }}
wget -c https://github.com/cheqd/cheqd-node/releases/download/v"${LEGACY_VERSION}"/cheqd-noded-"${LEGACY_VERSION}"-linux-amd64.tar.gz
tar -xvf cheqd-noded-"${LEGACY_VERSION}"-linux-amd64.tar.gz -C ${{ env.RUNNER_BIN_DIR }}
sudo chmod +x ${{ env.RUNNER_BIN_DIR }}/cheqd-noded
env:
LEGACY_VERSION: 2.0.1

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
cache: true

- name: Install ginkgo
working-directory: ./..
run: go install github.com/onsi/ginkgo/v2/ginkgo@latest

- name: Download new version of the Docker image (build-latest)
uses: actions/download-artifact@v4
with:
name: cheqd-node-build.tar

- name: Load node Docker image
run: docker load -i cheqd-node-build.tar

- name: Setting up network with old binary inside (mainnet version)
working-directory: ./tests/upgrade/integration
run: |
bash scripts/old_binary_setup.sh

- name: Run pre-upgrade tests
working-directory: ./tests/upgrade/integration/v3
run: |
ginkgo -r --race --tags upgrade_integration --focus-file pre_test.go --keep-going --trace --junit-report ../../../../report-pre-upgrade.xml

- name: Upload pre-upgrade tests result
uses: actions/upload-artifact@v4
with:
name: report-pre-upgrade.xml
path: report-pre-upgrade.xml

- name: Restart network using new node version (build-latest)
working-directory: ./tests/upgrade/integration
run: |
bash scripts/upgrade.sh

- name: Verifying docker processes
working-directory: ./tests/upgrade/integration
run: |
docker ps -a

- name: Run post-upgrade tests
working-directory: ./tests/upgrade/integration/v3
run: |
ginkgo -r --race --tags upgrade_integration --focus-file post_test.go --keep-going --trace --junit-report ../../../../report-post-upgrade.xml

- name: Upload post-upgrade tests result
uses: actions/upload-artifact@v4
with:
name: report-post-upgrade.xml
path: report-post-upgrade.xml

- name: Download binary artifact (build-latest)
uses: actions/download-artifact@v4
id: download
with:
name: cheqd-noded
path: ${{ env.RUNNER_BIN_DIR }}

- name: Restore binary permissions
run: sudo chmod +x ${{ env.RUNNER_BIN_DIR }}/cheqd-noded

- name: Run integration tests on upgraded network
working-directory: ./tests/integration
run: |
ginkgo -r --tags integration --race --randomize-suites --keep-going --trace --junit-report ../../report-upgraded-integration.xml

- name: Upload post-upgrade integration tests result
uses: actions/upload-artifact@v4
with:
name: report-upgraded-integration.xml
path: report-upgraded-integration.xml

- name: Show logs on failure
if: failure()
working-directory: ./docker/localnet
run: docker compose --env-file build-latest.env logs --tail --follow

- name: Submit governance fee parameter change proposals
working-directory: ./tests/upgrade/integration/v2
run: |
ginkgo -r --race --tags upgrade_integration --focus-file param_change_proposal_test.go --keep-going --trace --junit-report ../../../../report-pricing-proposal.xml

- name: Upload pricing proposal tests result
uses: actions/upload-artifact@v4
with:
name: report-pricing-proposal.xml
path: report-pricing-proposal.xml

- name: Run pricing integration tests after successful param change proposal
working-directory: ./tests/integration
run: |
ginkgo -r --tags integration --race --randomize-suites --keep-going --trace --skip-file cli_diddoc_test.go --skip-file cli_diddoc_negative_test.go --skip-file cli_resource_test.go --skip-file cli_resource_negative_test.go --junit-report ../../report-pricing-change.xml

- name: Upload pricing change tests result
uses: actions/upload-artifact@v4
with:
name: report-pricing-change.xml
path: report-pricing-change.xml

- name: Cleanup after tests
working-directory: ./tests/upgrade/integration
run: |
bash scripts/cleanup.sh

report-results:
name: "Report"
runs-on: ubuntu-20.04
# NOTE: If not next major release, only unit and integration tests are necessary, otherwise all tests are needed.
needs: [unit-tests, integration-tests]
# needs: [unit-tests, integration-tests, upgrade-tests]
# needs: [unit-tests, integration-tests]
needs: [unit-tests, integration-tests, upgrade-tests]
if: always()

steps:
Expand All @@ -319,41 +314,39 @@ jobs:
with:
name: report-integration.xml

# - name: Download pre-upgrade test Report
# uses: actions/download-artifact@v4
# with:
# name: report-pre-upgrade.xml

# - name: Download post-upgrade test Report
# uses: actions/download-artifact@v4
# with:
# name: report-post-upgrade.xml

# - name: Download upgraded integration test Report
# uses: actions/download-artifact@v4
# with:
# name: report-upgraded-integration.xml
- name: Download pre-upgrade test Report
uses: actions/download-artifact@v4
with:
name: report-pre-upgrade.xml

# - name: Download pricing proposal test Report
# uses: actions/download-artifact@v4
# with:
# name: report-pricing-proposal.xml
- name: Download post-upgrade test Report
uses: actions/download-artifact@v4
with:
name: report-post-upgrade.xml

# - name: Download pricing change test Report
# uses: actions/download-artifact@v4
# with:
# name: report-pricing-change.xml
- name: Download upgraded integration test Report
uses: actions/download-artifact@v4
with:
name: report-upgraded-integration.xml

- name: Download pricing proposal test Report
uses: actions/download-artifact@v4
with:
name: report-pricing-proposal.xml
- name: Download pricing change test Report
uses: actions/download-artifact@v4
with:
name: report-pricing-change.xml
- name: Combine test results
run: |
# python ./.github/scripts/xml_combine.py report-unit.xml report-integration.xml
python ./.github/scripts/xml_combine.py report-unit.xml report-integration.xml report-pre-upgrade.xml report-post-upgrade.xml report-upgraded-integration.xml report-pricing-proposal.xml report-pricing-change.xml > report.xml
# run: |
# python ./.github/scripts/xml_combine.py report-unit.xml report-integration.xml > report.xml

- uses: mikepenz/action-junit-report@v4
with:
report_paths: 'report.xml'
report_paths: "report.xml"
check_name: ""
suite_regex: '*'
suite_regex: "*"
include_passed: true
detailed_summary: true
20 changes: 20 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,7 @@ func (app *App) RegisterUpgradeHandlers() {
if err != nil {
return migrations, err
}
SetExplicitModuleAccountPermissions(ctx, app.AccountKeeper)
err = ConfigureFeeMarketModule(ctx, app.FeeMarketKeeper)
if err != nil {
return migrations, err
Expand All @@ -1151,6 +1152,7 @@ func (app *App) setupUpgradeStoreLoaders() {
storeUpgrades := storetypes.StoreUpgrades{
Added: []string{
feemarkettypes.StoreKey,
feeabstypes.StoreKey,
},
}
// configure store loader that checks if version == upgradeHeight and applies store upgrades
Expand Down Expand Up @@ -1186,3 +1188,21 @@ func ConfigureFeeMarketModule(ctx sdk.Context, keeper *feemarketkeeper.Keeper) e
func (app *App) Configurator() module.Configurator {
return app.configurator
}

func SetExplicitModuleAccountPermissions(ctx sdk.Context, accountKeeper authkeeper.AccountKeeper) {
// Get the module account using the account name
moduleAcc := accountKeeper.GetModuleAccount(ctx, didtypes.ModuleName)
// Ensure the account exists
if moduleAcc == nil {
panic("module account not found")
}
// Update the permissions (replace with the actual permissions)
newPermissions := []string{authtypes.Minter, authtypes.Burner} // Example permissions
// Cast the account to the concrete type that has permissions
if macc, ok := moduleAcc.(*authtypes.ModuleAccount); ok {
macc.Permissions = newPermissions
accountKeeper.SetModuleAccount(ctx, macc) // Update the account in the keeper
} else {
panic("failed to cast module account to *ModuleAccount")
}
}
2 changes: 1 addition & 1 deletion docker/localnet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,4 @@ volumes:
validator-2-data:
validator-3-data:
seed-0-data:
observer-0-data:
observer-0-data:
Loading
Loading