Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Lbqds committed Sep 8, 2023
1 parent fdcbca0 commit 2697cd2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.6'
go-version: '1.19.3'
- run: make node && make guardian-test

ethereum:
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.6'
go-version: '1.19.3'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion alephium/test/fixtures/wormhole-fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export async function expectAssertionFailed<T>(func: () => Promise<T>) {
}

export async function expectNotEnoughBalance<T>(func: () => Promise<T>) {
await expectFailed(func, ['NotEnoughBalance'])
await expectFailed(func, ['NotEnoughApprovedBalance'])
}

export async function expectOneOfError<T>(func: () => Promise<T>, errors: string[]) {
Expand Down
6 changes: 5 additions & 1 deletion node/pkg/alephium/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ func TestSubscribeEvents(t *testing.T) {
event3 := randomEvent(2)
eventsFromForkChain := []*UnconfirmedEvent{event2, event3}

watcher := &Watcher{chainIndex: &ChainIndex{0, 0}, currentHeight: 0}
watcher := &Watcher{
chainIndex: &ChainIndex{0, 0},
currentHeight: 0,
blockPollerEnabled: &atomic.Bool{},
}

confirmedEvents := make([]*ConfirmedEvent, 0)
handler := func(logger *zap.Logger, confirmed []*ConfirmedEvent) error {
Expand Down

0 comments on commit 2697cd2

Please sign in to comment.