@@ -19,7 +19,7 @@ abstract class HashtopolisTest {
1919 protected $ user ;
2020 protected $ apiKey ;
2121
22- const USER_PASS = "HG78Ghdfs87gh " ;
22+ const USER_PASS = "hashtopolis " ;
2323
2424 const RUN_FULL = 0 ;
2525 const RUN_FAST = 1 ;
@@ -70,28 +70,27 @@ public function init($version) {
7070 global $ PEPPER , $ VERSION ;
7171
7272 // drop old data and create empty DB
73- Factory::getAgentFactory ()->getDB ()->query ("DROP DATABASE IF EXISTS hashtopolis " );
73+ /* Factory::getAgentFactory()->getDB()->query("DROP DATABASE IF EXISTS hashtopolis");
7474 Factory::getAgentFactory()->getDB()->query("CREATE DATABASE hashtopolis");
7575 Factory::getAgentFactory()->getDB()->query("USE hashtopolis");
7676
7777 // load DB
7878 if ($version == "master") {
79- Factory::getAgentFactory ()->getDB ()->query (file_get_contents (dirname (__FILE__ ) ."/../src/install/hashtopolis .sql " ));
79+ Factory::getAgentFactory()->getDB()->query(file_get_contents(dirname(__FILE__) ."/../src/migrations/mysql/20251127000000_initial .sql"));
8080 }
8181 else {
8282 Factory::getAgentFactory()->getDB()->query(file_get_contents(dirname(__FILE__) . "/files/db_" . $version . ".sql"));
8383 }
8484
85- sleep (1 );
85+ sleep(1);*/
8686
8787 // insert user and api key
88- $ salt = Util::randomString (30 );
88+ /* $salt = Util::randomString(30);
8989 $hash = Encryption::passwordHash(HashtopolisTest::USER_PASS, $salt);
9090 $this->user = new User(null, 'testuser', '', $hash, $salt, 1, 0, 0, 0, 3600, AccessUtils::getOrCreateDefaultAccessGroup()->getId(), 0, '', '', '', '');
91- $ this ->user = Factory::getUserFactory ()->save ($ this ->user );
92- $ accessGroup = new AccessGroupUser (null , 1 , $ this ->user ->getId ());
93- Factory::getAccessGroupUserFactory ()->save ($ accessGroup );
94- $ this ->apiKey = new ApiKey (null , 0 , time () + 3600 , 'mykey ' , 0 , $ this ->user ->getId (), 1 );
91+ $this->user = Factory::getUserFactory()->save($this->user);*/
92+ AccessUtils::getOrCreateDefaultAccessGroup ();
93+ $ this ->apiKey = new ApiKey (null , 0 , time () + 3600 , 'mykey ' , 0 , 1 , 1 );
9594 $ this ->apiKey = Factory::getApiKeyFactory ()->save ($ this ->apiKey );
9695 // $versionStore = new StoredValue("version", ($version == 'master') ? explode("+", $VERSION)[0] : $version);
9796 // Factory::getStoredValueFactory()->save($versionStore);
0 commit comments