Skip to content

Commit

Permalink
Fix test (#142)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
kp-cat authored Nov 4, 2024
1 parent 01a6f4d commit abb9eb6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/elixir-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ jobs:
run: mix dialyzer

- name: Execute tests
run: mix coveralls.json --warnings-as-errors
run: |
mix test --only integration --warnings-as-errors --max-cases 1 --cover --export-coverage integration-coverage
mix coveralls --exclude integration --warnings-as-errors --import-cover cover
- name: Upload coverage report
run: bash <(curl -s https://codecov.io/bash)
Expand Down
5 changes: 4 additions & 1 deletion test/config_cat_test.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
defmodule ConfigCatTest do
use ConfigCat.ClientCase, async: true
# Must be async: false to avoid a collision with other tests.
# Now that we only allow a single ConfigCat instance to use the same SDK key,
# one of the async tests would fail due to the existing running instance.
use ConfigCat.ClientCase, async: false

import ExUnit.CaptureLog
import Jason.Sigil
Expand Down
2 changes: 2 additions & 0 deletions test/integration_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ defmodule ConfigCat.IntegrationTest do
alias ConfigCat.InMemoryCache
alias ConfigCat.LocalMapDataSource

@moduletag :integration

@sdk_key "configcat-sdk-1/PKDVCLf-Hq-h-kCzMp-L7Q/1cGEJXUwYUGZCBOL-E2sOw"

describe "SDK key validation" do
Expand Down

0 comments on commit abb9eb6

Please sign in to comment.