]> git.agnieray.net Git - galette.git/commitdiff
Add telemetry step at install
authorJohan Cwiklinski <johan@x-tnd.be>
Fri, 27 Oct 2023 09:30:21 +0000 (11:30 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Sun, 5 Nov 2023 09:43:45 +0000 (10:43 +0100)
Rework installation steps
Add htmlentities on translated titles
Missing cascade on postgreslq payment types table drop
Add cascade on all postgresql drop calls
Adapt tests

galette/install/scripts/pgsql.sql
galette/install/steps/telemetry.php [new file with mode: 0644]
galette/lib/Galette/Core/Install.php
galette/webroot/installer.php
tests/Galette/Core/tests/units/Install.php

index d9d6cafdab2274aa6c6db07a314cd112414137b3..1628c1fb4140300125e79fa5d8fd1be6bca79209 100644 (file)
@@ -167,7 +167,7 @@ CREATE SEQUENCE galette_socials_id_seq
 
 -- Schema
 -- REMINDER: Create order IS important, dependencies first !!
-DROP TABLE IF EXISTS galette_paymenttypes;
+DROP TABLE IF EXISTS galette_paymenttypes CASCADE;
 CREATE TABLE galette_paymenttypes (
   type_id integer DEFAULT nextval('galette_paymenttypes_id_seq'::text) NOT NULL,
   type_name character varying(50) NOT NULL,
@@ -249,7 +249,7 @@ CREATE TABLE galette_transactions (
     PRIMARY KEY (trans_id)
 );
 
-DROP TABLE IF EXISTS galette_cotisations;
+DROP TABLE IF EXISTS galette_cotisations CASCADE;
 CREATE TABLE galette_cotisations (
     id_cotis integer DEFAULT nextval('galette_cotisations_id_seq'::text)  NOT NULL,
     id_adh integer REFERENCES galette_adherents (id_adh) ON DELETE RESTRICT ON UPDATE CASCADE,
@@ -264,7 +264,7 @@ CREATE TABLE galette_cotisations (
     PRIMARY KEY (id_cotis)
 );
 
-DROP TABLE IF EXISTS galette_preferences;
+DROP TABLE IF EXISTS galette_preferences CASCADE;
 CREATE TABLE galette_preferences (
   id_pref integer DEFAULT nextval('galette_preferences_id_seq'::text) NOT NULL,
   nom_pref character varying(100) DEFAULT '' NOT NULL,
@@ -274,7 +274,7 @@ CREATE TABLE galette_preferences (
 -- add index, nom_pref is used as foreign key elsewhere
 CREATE UNIQUE INDEX galette_preferences_nom_pref_idx ON galette_preferences (nom_pref);
 
-DROP TABLE IF EXISTS galette_logs;
+DROP TABLE IF EXISTS galette_logs CASCADE;
 CREATE TABLE galette_logs (
   id_log integer DEFAULT nextval('galette_logs_id_seq'::text) NOT NULL,
   date_log timestamp NOT NULL,
@@ -308,7 +308,7 @@ CREATE TABLE galette_field_types (
 CREATE INDEX galette_field_types_field_form_idx ON galette_field_types (field_form);
 
 -- Table for dynamic fields data;
-DROP TABLE IF EXISTS galette_dynamic_fields;
+DROP TABLE IF EXISTS galette_dynamic_fields CASCADE;
 CREATE TABLE galette_dynamic_fields (
   item_id integer DEFAULT '0' NOT NULL, -- could be id_adh, trans_id, id_cotis
   field_id integer REFERENCES galette_field_types (field_id) ON DELETE RESTRICT ON UPDATE CASCADE,
@@ -318,7 +318,7 @@ CREATE TABLE galette_dynamic_fields (
   PRIMARY KEY (item_id, field_id, field_form, val_index)
 );
 
-DROP TABLE IF EXISTS galette_pictures;
+DROP TABLE IF EXISTS galette_pictures CASCADE;
 CREATE TABLE galette_pictures (
   id_adh integer DEFAULT '0' NOT NULL,
   picture bytea NOT NULL,
@@ -327,7 +327,7 @@ CREATE TABLE galette_pictures (
 );
 
 -- Table for dynamic translation of strings;
-DROP TABLE IF EXISTS galette_l10n;
+DROP TABLE IF EXISTS galette_l10n CASCADE;
 CREATE TABLE galette_l10n (
   text_orig character varying(255) NOT NULL,
   text_locale character varying(15) NOT NULL,
@@ -337,7 +337,7 @@ CREATE TABLE galette_l10n (
 );
 
 -- new table for temporary passwords  2006-02-18;
-DROP TABLE IF EXISTS galette_tmppasswds;
+DROP TABLE IF EXISTS galette_tmppasswds CASCADE;
 CREATE TABLE galette_tmppasswds (
   id_adh integer REFERENCES galette_adherents (id_adh) ON DELETE CASCADE ON UPDATE CASCADE,
   tmp_passwd character varying(250) NOT NULL,
@@ -346,7 +346,7 @@ CREATE TABLE galette_tmppasswds (
 );
 
 -- Table for automatic mails and their translations 2007-10-22;
-DROP TABLE IF EXISTS galette_texts;
+DROP TABLE IF EXISTS galette_texts CASCADE;
 CREATE TABLE galette_texts (
   tid integer DEFAULT nextval('galette_texts_id_seq'::text) NOT NULL,
   tref character varying(20) NOT NULL,
@@ -367,7 +367,7 @@ CREATE TABLE galette_fields_categories (
   PRIMARY KEY (id_field_category)
 );
 
-DROP TABLE IF EXISTS galette_fields_config;
+DROP TABLE IF EXISTS galette_fields_config CASCADE;
 CREATE TABLE galette_fields_config (
   table_name character varying(30) NOT NULL,
   field_id character varying(30) NOT NULL,
@@ -381,7 +381,7 @@ CREATE TABLE galette_fields_config (
 );
 
 -- Table for mailing history storage
-DROP TABLE IF EXISTS galette_mailing_history;
+DROP TABLE IF EXISTS galette_mailing_history CASCADE;
 CREATE TABLE galette_mailing_history (
   mailing_id integer DEFAULT nextval('galette_mailing_history_id_seq'::text) NOT NULL,
   mailing_sender integer REFERENCES galette_adherents (id_adh) ON DELETE RESTRICT ON UPDATE CASCADE,
@@ -422,7 +422,7 @@ CREATE TABLE galette_groups_members (
 );
 
 -- Table for reminders
-DROP TABLE IF EXISTS galette_reminders;
+DROP TABLE IF EXISTS galette_reminders CASCADE;
 CREATE TABLE galette_reminders (
   reminder_id integer DEFAULT nextval('galette_reminders_id_seq'::text) NOT NULL,
   reminder_type integer NOT NULL,
@@ -450,7 +450,7 @@ CREATE TABLE galette_pdfmodels (
 );
 
 -- Table for import models
-DROP TABLE IF EXISTS galette_import_model;
+DROP TABLE IF EXISTS galette_import_model CASCADE;
 CREATE TABLE galette_import_model (
   model_id integer DEFAULT nextval('galette_import_model_id_seq'::text) NOT NULL,
   model_fields text,
@@ -459,7 +459,7 @@ CREATE TABLE galette_import_model (
 );
 
 -- Table for saved searches
-DROP TABLE IF EXISTS galette_searches;
+DROP TABLE IF EXISTS galette_searches CASCADE;
 CREATE TABLE galette_searches (
   search_id integer DEFAULT nextval('galette_searches_id_seq'::text) NOT NULL,
   name character varying(100) DEFAULT NULL,
@@ -471,7 +471,7 @@ CREATE TABLE galette_searches (
 );
 
 -- new table for temporary links
-DROP TABLE IF EXISTS galette_tmplinks;
+DROP TABLE IF EXISTS galette_tmplinks CASCADE;
 CREATE TABLE galette_tmplinks (
   hash character varying(250) NOT NULL,
   target smallint NOT NULL,
@@ -481,7 +481,7 @@ CREATE TABLE galette_tmplinks (
 );
 
 -- table for social networks
-DROP TABLE IF EXISTS galette_socials;
+DROP TABLE IF EXISTS galette_socials CASCADE;
 CREATE TABLE galette_socials (
   id_social integer DEFAULT nextval('galette_socials_id_seq'::text) NOT NULL,
   id_adh integer REFERENCES galette_adherents (id_adh) ON DELETE CASCADE ON UPDATE CASCADE,
@@ -493,7 +493,7 @@ CREATE TABLE galette_socials (
 CREATE INDEX galette_socials_idx ON galette_socials (type);
 
 -- table for database version
-DROP TABLE IF EXISTS galette_database;
+DROP TABLE IF EXISTS galette_database CASCADE;
 CREATE TABLE galette_database (
   version decimal NOT NULL
 );
diff --git a/galette/install/steps/telemetry.php b/galette/install/steps/telemetry.php
new file mode 100644 (file)
index 0000000..10176fc
--- /dev/null
@@ -0,0 +1,84 @@
+<?php
+
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Galette installation, telemetry
+ *
+ * PHP version 5
+ *
+ * Copyright © 2023 The Galette Team
+ *
+ * This file is part of Galette (http://galette.tuxfamily.org).
+ *
+ * Galette is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Galette is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Galette. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @category  Core
+ * @package   Galette
+ *
+ * @author    Johan Cwiklinski <johan@x-tnd.be>
+ * @copyright 2023 The Galette Team
+ * @license   http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
+ * @link      http://galette.tuxfamily.org
+ * @since     2023-10-27
+ */
+
+use Galette\Core\Plugins;
+use Galette\Core\Preferences;
+
+$preferences = new Preferences($zdb);
+$plugins = new Plugins();
+$telemetry = new \Galette\Util\Telemetry(
+    $zdb,
+    $preferences,
+    $plugins
+);
+?>
+                <form action="installer.php" method="POST" class="ui form">
+                    <div class="ui segment">
+                        <div class="content field">
+                            <div class="ui text container">
+                                <div class="ui toggle checkbox tooltip" title="<?php echo _T("Send anonymous and imprecise data about your Galette instance"); ?>">
+                                    <input type="checkbox" name="send_telemetry" tabindex="0" class="hidden" checked="checked"/>
+                                    <label><?php echo _T("Send telemetry information"); ?></label>
+                                </div>
+<?php
+if (!$telemetry->isRegistered()) {
+?>
+                                <a class="ui button right floated" href="<?php echo GALETTE_TELEMETRY_URI; ?>reference?showmodal&uuid=<?php echo $telemetry->getRegistrationUuid(); ?>" title="<?php echo _T("Register your organization as a Galette user"); ?>" target="_blank">
+                                    <i class="id card icon"></i>
+                                    <?php echo _T("Register"); ?>
+                                </a>
+<?php
+}
+?>
+                                <div class="ui message scrolling content">
+                                    <p><?php echo _T("Telemetry data are <strong>anonymous</strong>; nothing about your organization or its members will be sent."); ?></p>
+                                    <p>
+                                        <?php echo _T("Also note tha all data is sent over a <strong>HTTPS secured connection</strong>."); ?>
+                                    </p>
+                                    <div class="tdata">
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="ui mobile tablet computer reversed equal width grid">
+                        <div class="right aligned column">
+                            <button type="submit" class="ui right labeled icon button"><i class="angle double right icon"></i> <?php echo _T("Next step"); ?></button>
+                            <input type="hidden" name="install_telemetry_ok" value="1"/>
+                        </div>
+                    </div>
+                </form>
+
index 96e0d093b76e1e6709efa75e56ece272217a1712..7bb2420d3a5543d45e0cbc1a9bcfe1c054eeeb02 100644 (file)
@@ -62,8 +62,9 @@ class Install
     public const STEP_DB_UPGRADE = 5;
     public const STEP_DB_INSTALL = 6;
     public const STEP_ADMIN = 7;
-    public const STEP_GALETTE_INIT = 8;
-    public const STEP_END = 9;
+    public const STEP_TELEMETRY = 8;
+    public const STEP_GALETTE_INIT = 9;
+    public const STEP_END = 10;
 
     public const INSTALL = 'i';
     public const UPDATE = 'u';
@@ -143,6 +144,9 @@ class Install
             case self::STEP_ADMIN:
                 $step_title = _T("Admin parameters");
                 break;
+            case self::STEP_TELEMETRY:
+                $step_title = _T("Telemetry");
+                break;
             case self::STEP_GALETTE_INIT:
                 $step_title = _T("Galette initialization");
                 break;
@@ -303,7 +307,7 @@ class Install
      */
     public function postCheckDb()
     {
-        return $this->_step > self::STEP_DB_CHECKS;
+        return $this->_step >= self::STEP_DB_CHECKS;
     }
 
     /**
@@ -874,6 +878,26 @@ class Install
         return $this->_admin_pass;
     }
 
+    /**
+     * Set step to telemetry
+     *
+     * @return void
+     */
+    public function atTelemetryStep()
+    {
+        $this->_step = self::STEP_TELEMETRY;
+    }
+
+    /**
+     * Are we at telemetry step?
+     *
+     * @return boolean
+     */
+    public function isTelemetryStep()
+    {
+        return $this->_step === self::STEP_TELEMETRY;
+    }
+
     /**
      * Set step to Galette initialization
      *
index 3c08a77212a116af8be2f74ba71cb151acc32740..b62cd574337d688b4306753751df41f55f11ad60 100644 (file)
@@ -39,6 +39,9 @@ use Galette\Core\Db as GaletteDb;
 use Analog\Analog;
 use Analog\Handler;
 use Analog\Handler\LevelName;
+use Galette\Core\Plugins;
+use Galette\Core\Preferences;
+use Galette\Util\Telemetry;
 
 //set a flag saying we work from installer
 //that way, in galette.inc.php, we'll only include relevant parts
@@ -111,6 +114,24 @@ if ($install->isStepPassed(GaletteInstall::STEP_TYPE)) {
     Analog::handler($galette_run_log);
 }
 
+if (!$install->isEndStep()
+    && ($install->postCheckDb())
+) {
+    //if we have passed database configuration, define required constants
+    initDbConstants($install);
+
+    if ($install->postCheckDb()) {
+        try {
+            $zdb = new GaletteDb();
+        } catch (Throwable $e) {
+            if (!$install->isDbCheckStep()) {
+                throw $e;
+            }
+        }
+
+    }
+}
+
 if (isset($_POST['stepback_btn'])) {
     $install->atPreviousStep();
 } elseif (isset($_POST['install_permsok']) && $_POST['install_permsok'] == 1) {
@@ -149,6 +170,7 @@ if (isset($_POST['stepback_btn'])) {
             $_POST['install_dbprefix']
         );
         $install->atDbCheckStep();
+        initDbConstants($install);
     }
 } elseif (isset($_POST['install_dbperms_ok'])) {
     if ($install->isInstall()) {
@@ -162,7 +184,7 @@ if (isset($_POST['stepback_btn'])) {
 } elseif (isset($_POST['install_dbwrite_ok']) && $install->isInstall()) {
     $install->atAdminStep();
 } elseif (isset($_POST['install_dbwrite_ok']) && $install->isUpgrade()) {
-    $install->atGaletteInitStep();
+    $install->atTelemetryStep();
 } elseif (isset($_POST['install_adminlogin'])
     && isset($_POST['install_adminpass'])
     && $install->isInstall()
@@ -170,7 +192,7 @@ if (isset($_POST['stepback_btn'])) {
     if ($_POST['install_adminlogin'] == '') {
         $error_detected[] = _T("No user name");
     }
-    if (strpos($_POST['install_adminlogin'], '@') != false) {
+    if (strpos($_POST['install_adminlogin'], '@')) {
         $error_detected[] = _T("The username cannot contain the @ character");
     }
     if ($_POST['install_adminpass'] == '') {
@@ -189,24 +211,28 @@ if (isset($_POST['stepback_btn'])) {
             $_POST['install_adminlogin'],
             $_POST['install_adminpass']
         );
-        $install->atGaletteInitStep();
+        $install->atTelemetryStep();
+    }
+} elseif (isset($_POST['install_telemetry_ok'])) {
+    if (isset($_POST['send_telemetry'])) {
+        $preferences = new Preferences($zdb);
+        $plugins = new Plugins();
+        $telemetry = new Telemetry(
+            $zdb,
+            $preferences,
+            $plugins
+        );
+        try {
+            $telemetry->send();
+        } catch (Throwable $e) {
+            Analog::log($e->getMessage(), Analog::ERROR);
+        }
     }
+    $install->atGaletteInitStep();
 } elseif (isset($_POST['install_prefs_ok'])) {
     $install->atEndStep();
 }
 
-if (!$install->isEndStep()
-    && ($install->postCheckDb() || $install->isDbCheckStep())
-) {
-    //if we have passed database configuration, define required constants
-    initDbConstants($install);
-
-    if ($install->postCheckDb()) {
-        //while before check db, connection is not checked
-        $zdb = new GaletteDb();
-    }
-}
-
 header('Content-Type: text/html; charset=UTF-8');
 ?>
 <!DOCTYPE html>
@@ -283,86 +309,72 @@ if ($install->isCheckStep()) {
     include_once __DIR__ . '/../install/steps/db_install.php';
 } elseif ($install->isAdminStep()) {
     include_once __DIR__ . '/../install/steps/admin.php';
+} elseif ($install->isTelemetryStep()) {
+    include_once __DIR__ . '/../install/steps/telemetry.php';
 } elseif ($install->isGaletteInitStep()) {
     include_once __DIR__ . '/../install/steps/galette.php';
 } elseif ($install->isEndStep()) {
     include_once __DIR__ . '/../install/steps/end.php';
 }
 ?>
-                <div class="ui tablet stackable mini eight steps">
-                    <div class="step<?php if ($install->isCheckStep()) echo ' active'; ?>">
-                        <i class="tasks icon"></i>
-                        <div class="content">
-                            <div class="title"><?php echo _T("Checks"); ?></div>
-                        </div>
+                <div class="ui tablet stackable mini nine steps fluid">
+                    <div class="step<?php if ($install->isCheckStep()) echo ' active'; ?> tooltip" title="<?php echo htmlentities(_T("Checks"), ENT_QUOTES); ?>">
+                        <i class="tasks icon<?php if($install->isStepPassed(GaletteInstall::STEP_CHECK)) { echo ' green'; } ?>"></i>
+                        <span class="displaynone"><?php echo _T("Checks"); ?></span>
                     </div>
-                    <div class="step<?php if ($install->isTypeStep()) echo ' active'; ?>">
-                        <i class="question icon"></i>
-                        <div class="content">
-                            <div class="title"><?php echo _T("Installation mode"); ?></div>
-                        </div>
+                    <div class="step<?php if ($install->isTypeStep()) echo ' active'; ?> tooltip" title="<?php echo htmlentities(_T("Installation mode"), ENT_QUOTES); ?>">
+                        <i class="question icon<?php if($install->isStepPassed(GaletteInstall::STEP_TYPE)) { echo ' green'; } ?>"></i>
+                        <span class="displaynone"><?php echo _T("Installation mode"); ?></span>
                     </div>
-                    <div class="step<?php if ($install->isDbStep()) echo ' active'; ?>">
+                    <div class="step<?php if ($install->isDbStep()) echo ' active'; ?> tooltip" title="<?php echo htmlentities(_T("Database"), ENT_QUOTES); ?>">
                         <i class="database icon"></i>
-                        <div class="content">
-                            <div class="title"><?php echo _T("Database"); ?></div>
-                        </div>
+                        <span class="displaynone"><?php echo _T("Database"); ?></span>
                     </div>
-                    <div class="step<?php if ($install->isDbCheckStep()) echo ' active'; ?>">
+                    <div class="step<?php if ($install->isDbCheckStep()) echo ' active'; ?> tooltip" title="<?php echo htmlentities(_T("Database access/permissions"), ENT_QUOTES); ?>">
                         <i class="key icon"></i>
-                        <div class="content">
-                            <div class="title"><?php echo _T("Database access/permissions"); ?></div>
-                        </div>
+                        <span class="displaynone"><?php echo _T("Database access/permissions"); ?></span>
                     </div>
 <?php
 if ($install->isUpgrade()) {
     ?>
-                    <div class="step<?php if ($install->isVersionSelectionStep()) echo ' active'; ?>">
+                    <div class="step<?php if ($install->isVersionSelectionStep()) echo ' active'; ?> tooltip" title="<?php echo htmlentities(_T("Version selection"), ENT_QUOTES); ?>">
                         <i class="tag icon"></i>
-                        <div class="content">
-                            <div class="title"><?php echo _T("Version selection"); ?></div>
-                        </div>
+                        <span class="displaynone"><?php echo _T("Version selection"); ?></span>
                     </div>
-                    <div class="step<?php if ($install->isDbUpgradeStep()) echo ' active'; ?>">
+                    <div class="step<?php if ($install->isDbUpgradeStep()) echo ' active'; ?> tooltip" title="<?php echo htmlentities(_T("Database upgrade", ENT_QUOTES)); ?>">
                         <i class="sync alt icon"></i>
-                        <div class="content">
-                            <div class="title"><?php echo _T("Database upgrade"); ?></div>
-                        </div>
+                        <span class="displaynone"><?php echo _T("Database upgrade"); ?></span>
                     </div>
     <?php
 } else {
     ?>
-                    <div class="step<?php if ($install->isDbinstallStep()) echo ' active'; ?>">
+                    <div class="step<?php if ($install->isDbinstallStep()) echo ' active'; ?> tooltip" title="<?php echo htmlentities(_T("Database installation"), ENT_QUOTES); ?>">
                         <i class="spinner icon"></i>
-                        <div class="content">
-                            <div class="title"><?php echo _T("Database installation"); ?></div>
-                        </div>
+                        <span class="displaynone"><?php echo _T("Database installation"); ?></span>
                     </div>
     <?php
 }
 
 if (!$install->isUpgrade()) {
     ?>
-                    <div class="step<?php if ($install->isAdminStep()) echo ' active'; ?>">
+                    <div class="step<?php if ($install->isAdminStep()) echo ' active'; ?> tooltip" title="<?php echo htmlentities(_T("Admin parameters"), ENT_QUOTES); ?>">
                         <i class="user icon"></i>
-                        <div class="content">
-                            <div class="title"><?php echo _T("Admin parameters"); ?></div>
-                        </div>
+                        <span class="displaynone"><?php echo _T("Admin parameters"); ?></span>
                     </div>
     <?php
 }
 ?>
-                    <div class="step<?php if ($install->isGaletteInitStep()) echo ' active'; ?>">
+                    <div class="step<?php if ($install->isTelemetryStep()) echo ' active'; ?> tooltip" title="<?php echo htmlentities(_T("Telemetry"), ENT_QUOTES); ?>">
+                        <i class="chart bar icon"></i>
+                        <span class="displaynone"><?php echo _T("Telemetry"); ?></span>
+                    </div>
+                    <div class="step<?php if ($install->isGaletteInitStep()) echo ' active'; ?> tooltip" title="<?php echo htmlentities(_T("Galette initialisation"), ENT_QUOTES); ?>">
                         <i class="cogs icon"></i>
-                        <div class="content">
-                            <div class="title"><?php echo _T("Galette initialisation"); ?></div>
-                        </div>
+                        <span class="displaynone"><?php echo _T("Galette initialisation"); ?></span>
                     </div>
-                    <div class="step<?php if ($install->isEndStep()) echo ' active'; ?>">
+                    <div class="step<?php if ($install->isEndStep()) echo ' active'; ?> tooltip" title="<?php echo htmlentities(_T("End!"), ENT_QUOTES); ?>">
                         <i class="flag checkered icon"></i>
-                        <div class="content">
-                            <div class="title"><?php echo _T("End!"); ?></div>
-                        </div>
+                        <span class="displaynone"><?php echo _T("End!"); ?></span>
                     </div>
                 </div>
             </div>
index 154abe8fc6eb6e0d8c5d129e19b01c1c994f390b..59317d67621336d43a53119bb101575a1d706c15 100644 (file)
@@ -335,7 +335,7 @@ class Install extends TestCase
         $this->assertSame(PWD_DB, $pass);
 
         $post_check = $this->install->postCheckDb();
-        $this->assertFalse($post_check);
+        $this->assertTrue($post_check);
 
         $this->install->atPreviousStep();
         $step = $this->install->isDbStep();