mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Runtime: Rebars: Add log tests similar to the Mix job
This commit is contained in:
parent
b18fa2ebc2
commit
c69d88c45a
43
.github/workflows/runtime.yml
vendored
43
.github/workflows/runtime.yml
vendored
@ -81,33 +81,62 @@ jobs:
|
||||
rel/ejabberd/bin/ejabberdctl start \
|
||||
&& rel/ejabberd/bin/ejabberdctl started
|
||||
rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
|
||||
rel/ejabberd/bin/ejabberdctl registered_users localhost
|
||||
rel/ejabberd/bin/ejabberdctl register user2 localhost s0mePass
|
||||
rel/ejabberd/bin/ejabberdctl registered_users localhost > registered.log
|
||||
cat rel/ejabberd/logs/*
|
||||
|
||||
- name: Test rel
|
||||
- name: Run rel
|
||||
if: matrix.rebar != 'rebar'
|
||||
run: |
|
||||
make rel
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl start \
|
||||
&& _build/prod/rel/ejabberd/bin/ejabberdctl started
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl registered_users localhost
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl registered_users localhost > registered.log
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl stop \
|
||||
&& _build/prod/rel/ejabberd/bin/ejabberdctl stopped
|
||||
cat _build/prod/rel/ejabberd/logs/*
|
||||
|
||||
- name: Test dev
|
||||
- name: Run dev
|
||||
if: matrix.rebar != 'rebar'
|
||||
run: |
|
||||
make dev
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl start \
|
||||
&& _build/dev/rel/ejabberd/bin/ejabberdctl started
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl registered_users localhost
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl register user2 localhost s0mePass
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl registered_users localhost >> registered.log
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl stop \
|
||||
&& _build/dev/rel/ejabberd/bin/ejabberdctl stopped
|
||||
|
||||
- name: View logs
|
||||
if: matrix.rebar != 'rebar'
|
||||
run: |
|
||||
echo "===> Registered:"
|
||||
cat registered.log
|
||||
echo "===> Prod:"
|
||||
cat _build/prod/rel/ejabberd/logs/*
|
||||
echo "===> Dev:"
|
||||
cat _build/dev/rel/ejabberd/logs/*
|
||||
|
||||
- name: Check rel
|
||||
if: matrix.rebar != 'rebar'
|
||||
run: |
|
||||
grep -q '^user1$' registered.log
|
||||
grep -q '^user2$' registered.log
|
||||
grep -q 'is started' _build/prod/rel/ejabberd/logs/ejabberd.log
|
||||
grep -q 'is stopped' _build/prod/rel/ejabberd/logs/ejabberd.log
|
||||
test $(find _build/prod/ -empty -name error.log)
|
||||
grep -q 'is started' _build/dev/rel/ejabberd/logs/ejabberd.log
|
||||
grep -q 'is stopped' _build/dev/rel/ejabberd/logs/ejabberd.log
|
||||
test $(find _build/dev/ -empty -name error.log)
|
||||
|
||||
- name: View logs failures
|
||||
if: matrix.rebar != 'rebar'
|
||||
run: |
|
||||
cat _build/prod/rel/ejabberd/logs/ejabberd.log
|
||||
cat _build/prod/rel/ejabberd/logs/error.log
|
||||
cat _build/dev/rel/ejabberd/logs/ejabberd.log
|
||||
cat _build/dev/rel/ejabberd/logs/error.log
|
||||
|
||||
mix:
|
||||
name: Mix
|
||||
strategy:
|
||||
|
Loading…
Reference in New Issue
Block a user