Przeglądaj źródła

Add a simple test for persistent traces

pull/137/head
Andrew Thompson 12 lat temu
rodzic
commit
a9a26b0e1d
1 zmienionych plików z 14 dodań i 0 usunięć
  1. +14
    -0
      test/lager_test_backend.erl

+ 14
- 0
test/lager_test_backend.erl Wyświetl plik

@ -434,6 +434,20 @@ lager_test_() ->
ok
end
},
{"persistent traces work",
fun() ->
?assertEqual(0, count()),
lager:debug([{foo, bar}], "hello world"),
?assertEqual(0, count()),
application:stop(lager),
application:set_env(lager, traces, [{lager_test_backend, [{foo, bar}], debug}]),
application:start(lager),
lager:debug([{foo, bar}], "hello world"),
?assertEqual(1, count()),
application:unset_env(lager, traces),
ok
end
},
{"tracing honors loglevel",
fun() ->
lager:set_loglevel(?MODULE, error),

Ładowanie…
Anuluj
Zapisz