From 8f286795047bac9d2f84c503dbdd3737f13135db Mon Sep 17 00:00:00 2001 From: Luciano Righetti Date: Fri, 5 May 2023 11:37:06 +0200 Subject: [PATCH] fix: gh action --- .github/workflows/test.yml | 5 ++ docker/misp/config/app_local.gh_action.php | 59 ++-------------------- tests/README.md | 2 +- 3 files changed, 11 insertions(+), 55 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8c6f1c0c0..2283c9642 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,6 +33,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 + with: + submodules: recursive - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -53,6 +55,9 @@ jobs: - name: Populate database with initial schema run: mysql --defaults-file=misp.cnf -h 127.0.0.1 misp3_test < docker/db/misp-2.4.169.sql + - name: Debug DB + run: mysql --defaults-file=misp.cnf -h 127.0.0.1 misp3_test -e "SHOW TABLES;" + - name: Install composer packages run: composer install --no-interaction --no-progress --no-suggest --ignore-platform-reqs diff --git a/docker/misp/config/app_local.gh_action.php b/docker/misp/config/app_local.gh_action.php index 2d13e8382..6c9e5d395 100644 --- a/docker/misp/config/app_local.gh_action.php +++ b/docker/misp/config/app_local.gh_action.php @@ -16,57 +16,16 @@ $base = empty($temp['path']) ? false : $temp['path']; // end of block return [ - /* - * Debug Level: - * - * Production Mode: - * false: No error messages, errors, or warnings shown. - * - * Development Mode: - * true: Errors and warnings shown. - */ - 'debug' => filter_var(env('DEBUG', false), FILTER_VALIDATE_BOOLEAN), - - /* - * Security and encryption configuration - * - * - salt - A random string used in security hashing methods. - * The salt value is also used as the encryption key. - * You should treat it as extremely sensitive data. - */ + 'debug' => false, 'Security' => [ - 'salt' => env('SECURITY_SALT', '__SALT__'), + 'salt' => 'foobar', ], - - /* - * Connection information used by the ORM to connect - * to your application's datastores. - * - * See app.php for more configuration options. - */ 'Datasources' => [ 'default' => [ 'host' => '127.0.0.1', - /* - * CakePHP will use the default DB port based on the driver selected - * MySQL on MAMP uses port 8889, MAMP users will want to uncomment - * the following line and set the port accordingly - */ - //'port' => 'non_standard_port_number', - - 'username' => env('MISP_DB_USER', 'misp'), - 'password' => env('MISP_DB_PASSWORD'), - 'database' => env('MISP_DB', 'misp3'), - /** - * If not using the default 'public' schema with the PostgreSQL driver - * set it here. - */ - //'schema' => 'myapp', - - /** - * You can use a DSN string to set the entire configuration - */ - // 'url' => env('DATABASE_URL', null), + 'username' => 'misp', + 'password' => 'misp', + 'database' => 'misp3_test', ], /* * The test connection is used during the test suite. @@ -78,14 +37,6 @@ return [ 'database' => 'misp3_test', ], ], - - /* - * Email configuration. - * - * Host and credential configuration in case you are using SmtpTransport - * - * See app.php for more configuration options. - */ 'EmailTransport' => [ 'default' => [ 'host' => '127.0.0.1', diff --git a/tests/README.md b/tests/README.md index 085b46563..ac441cf05 100644 --- a/tests/README.md +++ b/tests/README.md @@ -16,7 +16,7 @@ If running locally: Add a `misp3_test` database to the database: ```mysql CREATE DATABASE misp3_test; -GRANT ALL PRIVILEGES ON misp3_test.* to misp@localhost; +GRANT ALL PRIVILEGES ON misp3_test.* to misp@'%'; FLUSH PRIVILEGES; QUIT; ```