move all scripts into one location
- standardize includes, namings - made migrate executable - updated ConfigurationCombinationsTest generator to work with current persistance API
This commit is contained in:
parent
8389c2a2d6
commit
62bb68344c
|
@ -1,3 +1,5 @@
|
|||
bin/configuration-test-generator export-ignore
|
||||
bin/icon-test export-ignore
|
||||
doc/ export-ignore
|
||||
tst/ export-ignore
|
||||
img/browserstack.svg export-ignore
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
* DANGER: Too many options/settings and too high max iteration setting may trigger
|
||||
* a fork bomb. Please save your work before executing this script.
|
||||
*/
|
||||
include 'Bootstrap.php';
|
||||
|
||||
define('PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR);
|
||||
include PATH . 'tst' . DIRECTORY_SEPARATOR . 'Bootstrap.php';
|
||||
|
||||
$vd = array('view', 'delete');
|
||||
$vcd = array('view', 'create', 'delete');
|
||||
|
@ -392,7 +394,7 @@ class ConfigurationTestGenerator
|
|||
}
|
||||
}
|
||||
$code .= '}' . PHP_EOL;
|
||||
file_put_contents('ConfigurationCombinationsTest.php', $code);
|
||||
file_put_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'tst' . DIRECTORY_SEPARATOR . 'ConfigurationCombinationsTest.php', $code);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -428,6 +430,8 @@ class ConfigurationCombinationsTest extends PHPUnit_Framework_TestCase
|
|||
Helper::confBackup();
|
||||
$this->_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'privatebin_data';
|
||||
$this->_model = new Filesystem(array('dir' => $this->_path));
|
||||
ServerSalt::setStore($this->_model);
|
||||
TrafficLimiter::setStore($this->_model);
|
||||
$this->reset();
|
||||
}
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
// change this, if your php files and data is outside of your webservers document root
|
||||
define('PATH', '..' . DIRECTORY_SEPARATOR);
|
||||
define('PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR);
|
||||
|
||||
define('PUBLIC_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
require PATH . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
|
@ -171,9 +172,9 @@ function helpexit ()
|
|||
print("migrate.php - Copy data between PrivateBin backends
|
||||
|
||||
Usage:
|
||||
php migrate.php [--delete-after] [--delete-during] [-f] [-n] [-v] srcconfdir
|
||||
migrate [--delete-after] [--delete-during] [-f] [-n] [-v] srcconfdir
|
||||
[<dstconfdir>]
|
||||
php migrate.php [-h]
|
||||
migrate [-h]
|
||||
|
||||
Options:
|
||||
--delete-after delete data from source after all pastes and comments have
|
|
@ -1,7 +1,6 @@
|
|||
<phpunit bootstrap="Bootstrap.php" colors="true">
|
||||
<testsuite name="PrivateBin Test Suite">
|
||||
<directory suffix=".php">./</directory>
|
||||
<exclude>ConfigurationTestGenerator.php</exclude>
|
||||
</testsuite>
|
||||
<filter>
|
||||
<whitelist>
|
||||
|
|
Loading…
Reference in New Issue