Skip to content

Commit dd9e890

Browse files
authored
Fix tests (#314)
* Fix eunits * Fix test workflows * Update run on
1 parent 46f5b38 commit dd9e890

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
name: Tests
22

33
on:
4-
push:
5-
branches: '*'
64
pull_request:
7-
branches: main
8-
# Run every day at midnight PST (0800 UTC)
9-
# https://crontab.guru/#0_8_*_*_*
10-
schedule:
11-
- cron: '0 8 * * *'
5+
branches: ["main"]
6+
push:
7+
branches: ["main"]
8+
tags: ["*"]
129
workflow_dispatch:
1310

1411
jobs:
@@ -184,11 +181,13 @@ jobs:
184181
- name: localstack
185182
run: |
186183
curl 'http://localstack:4566/health'
187-
pip install awscli-local[ver1]
184+
python3 -m venv /tmp/venv
185+
. /tmp/venv/bin/activate
186+
pip install --no-cache-dir awscli-local[ver1]
188187
aws configure set aws_access_key_id testkey
189188
aws configure set aws_secret_access_key testsecret
190189
aws configure set default.region us-east-1
191-
aws s3 mb s3://test-bucket --endpoint-url=http://localstack:4566
190+
aws --endpoint-url=http://localstack:4566 s3 mb s3://test-bucket
192191
- name: rust
193192
uses: actions-rs/toolchain@v1
194193
with:

src/hpr_routing.erl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ foreach_setup() ->
499499
true = erlang:register(hpr_sup, self()),
500500
ok = hpr_route_ets:init(),
501501
ok = hpr_multi_buy:init(),
502+
ok = hpr_device_stats:init(),
502503
meck:new(hpr_gateway_location, [passthrough]),
503504
meck:expect(hpr_gateway_location, get, fun(_) -> {error, not_implemented} end),
504505
ok.
@@ -507,6 +508,7 @@ foreach_cleanup(ok) ->
507508
true = ets:delete(hpr_multi_buy_ets),
508509
true = ets:delete(hpr_route_devaddr_ranges_ets),
509510
true = ets:delete(hpr_route_eui_pairs_ets),
511+
true = ets:delete(hpr_device_stats_ets),
510512
lists:foreach(
511513
fun(RouteETS) ->
512514
SKFETS = hpr_route_ets:skf_ets(RouteETS),

0 commit comments

Comments
 (0)