some modification for running tests on github

This commit is contained in:
Dario Rekowski on RockPI 2021-05-28 11:29:29 +00:00
parent a29400722f
commit 23bbbb4454
3 changed files with 7 additions and 3 deletions

View File

@ -297,6 +297,10 @@ jobs:
--health-interval=5s --health-interval=5s
--health-timeout=2s --health-timeout=2s
--health-retries=3 --health-retries=3
login-server:
image: gradido/login_server:latest
ports:
- 1201:1201
steps: steps:
- name: Debug service - name: Debug service
run: echo "$(docker ps)" run: echo "$(docker ps)"
@ -320,7 +324,7 @@ jobs:
########################################################################## ##########################################################################
- name: community server | Unit tests - name: community server | Unit tests
run: | run: |
docker run --network container:$(docker container ls | grep mariadb | awk '{ print $1 }') -v ~/coverage:/var/www/cakephp/webroot/coverage gradido/community_server:test docker run --network container:$(docker container ls | grep mariadb | awk '{ print $1 }') --network container:$(docker container ls | grep login | awk '{ print $1 }') -v ~/coverage:/var/www/cakephp/webroot/coverage gradido/community_server:test
cp -r ~/coverage ./coverage cp -r ~/coverage ./coverage
########################################################################## ##########################################################################
# COVERAGE CHECK BACKEND COMMUNITY-SERVER #################################### # COVERAGE CHECK BACKEND COMMUNITY-SERVER ####################################

View File

@ -19,7 +19,7 @@ class TransactionCreationsFixture extends BaseTestFixture
'transaction_id' => ['type' => 'integer', 'length' => 10, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null], 'transaction_id' => ['type' => 'integer', 'length' => 10, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
'state_user_id' => ['type' => 'integer', 'length' => 10, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null], 'state_user_id' => ['type' => 'integer', 'length' => 10, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
'amount' => ['type' => 'biginteger', 'length' => 20, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null], 'amount' => ['type' => 'biginteger', 'length' => 20, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
'ident_hash' => ['type' => 'binary', 'length' => 32, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null], 'ident_hash' => ['type' => 'binary', 'length' => 32, 'null' => false, 'default' => '0000000000000000000000000000000000000000000000000000000000000000', 'comment' => '', 'precision' => null],
'target_date' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null], 'target_date' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
'_constraints' => [ '_constraints' => [
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []], 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],

View File

@ -265,7 +265,7 @@ class AppRequestControllerTest extends TestCase
} }
if(is_array($expected)) { if(is_array($expected)) {
$dynamic_fields = ['timeUsed', 'decay_date', 'decay']; $dynamic_fields = ['timeUsed', 'decay_date', 'decay', 'gdtSum'];
// copy timeUsed because this value will be variy always // copy timeUsed because this value will be variy always
foreach($dynamic_fields as $field) { foreach($dynamic_fields as $field) {
if(isset($expected[$field]) && isset($json->$field)) { if(isset($expected[$field]) && isset($json->$field)) {