Skip to content

Commit abb9eb6

Browse files
authored
Fix test (#142)
* fix test * comment out block test * remove commented block * async: false test comment * comment out block test * test trace * validate sdk integration test turned off * remove trace from github CI * block test is back * - block test + test trace * print Registry entry * add registry items to warning message * message fix * test finished log * allow IO.puts * print registry * clear registry before all test * add extra print_registry_contents * cleanup * move block test into integration test * fix module in integration_test * revert clear_registry + inline using_block_test * run CI tests with max-cases 1 * run CI integration tests with max-cases 1 * CI: merge coverall reports * remove max-cases 1 * Revert "remove max-cases 1" This reverts commit 877ed28.
1 parent 01a6f4d commit abb9eb6

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/elixir-ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ jobs:
5858
run: mix dialyzer
5959

6060
- name: Execute tests
61-
run: mix coveralls.json --warnings-as-errors
61+
run: |
62+
mix test --only integration --warnings-as-errors --max-cases 1 --cover --export-coverage integration-coverage
63+
mix coveralls --exclude integration --warnings-as-errors --import-cover cover
6264
6365
- name: Upload coverage report
6466
run: bash <(curl -s https://codecov.io/bash)

test/config_cat_test.exs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
defmodule ConfigCatTest do
2-
use ConfigCat.ClientCase, async: true
2+
# Must be async: false to avoid a collision with other tests.
3+
# Now that we only allow a single ConfigCat instance to use the same SDK key,
4+
# one of the async tests would fail due to the existing running instance.
5+
use ConfigCat.ClientCase, async: false
36

47
import ExUnit.CaptureLog
58
import Jason.Sigil

test/integration_test.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ defmodule ConfigCat.IntegrationTest do
99
alias ConfigCat.InMemoryCache
1010
alias ConfigCat.LocalMapDataSource
1111

12+
@moduletag :integration
13+
1214
@sdk_key "configcat-sdk-1/PKDVCLf-Hq-h-kCzMp-L7Q/1cGEJXUwYUGZCBOL-E2sOw"
1315

1416
describe "SDK key validation" do

0 commit comments

Comments
 (0)