Skip to content

Commit

Permalink
test(dan): fix broken dan layer integration tests (#4223)
Browse files Browse the repository at this point in the history
Description
---

- Fix any tests marked `@broken`
- Remove old layer 2 code
- Add more specific assertions for tests
- Add a CI workflow for dan layer tests to ensure PR's don't break existing functionality

Motivation and Context
---
We can't keep letting tests break and spending lots of time backdating the changes. Ensure they work, and continue to work moving forward.

How Has This Been Tested?
---
Oh- the tests have been tested alright


* Remove old test steps

* Update worldly helpers

* Fix vn id file name

* Only startNew call init()

* Pass new config setting during startup

* Break out configuration settings of vn into its own step

* Add additional steps for VN validations

* Update auto acceptance test

* Update test nodes config

* Fix broken test

* Syntax updates for existing steps

* Remove old layer 2 scenarios that will no longer function

* Refactor repeated pattern to a helper function

* Add new workflow

* Include wallet package lock

* Remove unneeded tags

* Remove namespace conflict

* Checkpoints broke auto accept, fix this spec later
  • Loading branch information
brianp authored Jun 23, 2022
1 parent 10613c8 commit 6965bfb
Show file tree
Hide file tree
Showing 12 changed files with 602 additions and 243 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/dan_layer_integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: DAN
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
env:
toolchain: nightly-2021-11-20

jobs:
dan-layer-integration-tests:
name: integration tests
runs-on: [ self-hosted, ubuntu18.04-high-cpu ]
steps:
- name: checkout
uses: actions/checkout@v2
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.toolchain }}
profile: minimal
override: true
- uses: Swatinem/rust-cache@v1
- name: ubuntu dependencies
run: |
sudo apt-get update && \
sudo apt-get -y install \
openssl \
libssl-dev \
pkg-config \
libsqlite3-dev \
clang-10 \
git \
cmake \
libc++-dev \
libc++abi-dev \
libprotobuf-dev \
protobuf-compiler \
libncurses5-dev \
libncursesw5-dev \
zip \
build-essential \
libgtk-3-dev \
libwebkit2gtk-4.0-dev \
libsoup2.4-dev \
curl \
wget \
libappindicator3-dev \
patchelf \
librsvg2-dev
- name: node -v
run: node -v
- name: build base node
uses: actions-rs/cargo@v1
with:
command: build
args: --release --bin tari_base_node -Z unstable-options
- name: build console wallet
uses: actions-rs/cargo@v1
with:
command: build
args: --release --bin tari_console_wallet -Z unstable-options
- name: build merge mining proxy
uses: actions-rs/cargo@v1
with:
command: build
args: --release --bin tari_merge_mining_proxy -Z unstable-options
- name: build miner
uses: actions-rs/cargo@v1
with:
command: build
args: --release --bin tari_miner -Z unstable-options
- name: build wallet-ffi
uses: actions-rs/cargo@v1
with:
command: build
args: --release --package tari_wallet_ffi -Z unstable-options
- name: build validator node
uses: actions-rs/cargo@v1
with:
command: build
args: --release --bin tari_validator_node -Z unstable-options
- name: npm ci
run: cd integration_tests && npm ci && cd node_modules/wallet-grpc-client && npm ci
- name: Run integration tests
run: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --profile "non-critical" --tags "@dan and not @broken" --format json:cucumber_output/tests.cucumber --exit --retry 2 --retry-tag-filter "@flaky and not @broken"
- name: Generate report
if: always()
run: cd integration_tests && node ./generate_report.js
- name: Store test results
uses: actions/upload-artifact@v3
if: always()
with:
name: test results
path: |
integration_tests/cucumber_output
integration_tests/temp/reports
262 changes: 262 additions & 0 deletions clients/wallet_grpc_client/package-lock.json

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

6 changes: 4 additions & 2 deletions integration_tests/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,10 @@ new_asset_scanning_interval = 10
# If set then only the specific assets will be checked.
# assets_allow_list = ["<pubkey>"]

committee_management_polling_interval = 5
committee_management_confirmation_time = 20

constitution_auto_accept = false
constitution_management_polling_interval = 5
constitution_management_confirmation_time = 20
########################################################################################################################
# #
# Collectibles Configuration Options #
Expand Down
Loading

0 comments on commit 6965bfb

Please sign in to comment.