mirror of
https://github.com/ConvoyPanel/panel.git
synced 2026-09-06 17:19:04 +08:00
Splits the old binary quota throttle into a persistent per-server speed cap and a configurable overage penalty (throttle-to-rate or disconnect the NIC), resolved via a server -> node -> global cascade. Adds a spatie/laravel-settings global default (BandwidthSettings), moves quota reset to a per-server day-of-month anchor, and re-architects enforcement into a per-server SyncServerRateLimitJob batched per node (replacing the single node-wide loop). Correctness fixes folded in: - RateLimitCast now uses Proxmox decimal MB (was binary MiB, ~4.86% off) - the -1 = unlimited quota no longer false-throttles servers - remove a dead backup_limit rule in UpdateBuildRequest (phantom column/key) Scheduler (routes/console.php) enabled for sync-usages / reset-usages / sync-rate-limits. Frontend deferred; full UI TODO recorded in docs/v10-next-handoff.md. Design + phase log in docs/bandwidth-rate-limiting-plan.md. Refs #108.
32 lines
1.3 KiB
XML
32 lines
1.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" bootstrap="tests/bootstrap.php" colors="true" cacheDirectory=".phpunit.cache">
|
|
<testsuites>
|
|
<testsuite name="Unit">
|
|
<directory suffix="Test.php">./tests/Unit</directory>
|
|
</testsuite>
|
|
<testsuite name="Feature">
|
|
<directory suffix="Test.php">./tests/Feature</directory>
|
|
</testsuite>
|
|
</testsuites>
|
|
<coverage/>
|
|
<php>
|
|
<env name="APP_ENV" value="testing"/>
|
|
<env name="BCRYPT_ROUNDS" value="4"/>
|
|
<env name="CACHE_STORE" value="array"/>
|
|
<!-- The test database is redirected in tests/bootstrap.php via
|
|
DB_TEST_DATABASE — see that file for why <env> can't do it here. -->
|
|
<env name="MAIL_MAILER" value="array"/>
|
|
<env name="QUEUE_CONNECTION" value="sync"/>
|
|
<env name="SESSION_DRIVER" value="array"/>
|
|
<!-- Settings cache leaks across tests (RefreshDatabase only resets the DB),
|
|
so disable it here; it's a production read optimization. -->
|
|
<env name="SETTINGS_CACHE_ENABLED" value="false"/>
|
|
<env name="TELESCOPE_ENABLED" value="false"/>
|
|
</php>
|
|
<source>
|
|
<include>
|
|
<directory suffix=".php">./app</directory>
|
|
</include>
|
|
</source>
|
|
</phpunit>
|