Remove static cache from our_address in favour of Cache::class keyed off setup:system_id
This commit is contained in:
@@ -4,6 +4,7 @@ namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Tests\TestCase;
|
||||
|
||||
use App\Models\{Address,Domain,Setup,System};
|
||||
@@ -268,10 +269,12 @@ class RoutingTest extends TestCase
|
||||
|
||||
public function test_complex_rc_nc_hc_us()
|
||||
{
|
||||
Cache::forget('so');
|
||||
$setup = Setup::findOrFail(config('app.id'));
|
||||
$ao = Address::findFTN('100:10/0.0@a');
|
||||
$setup->system_id = $ao->system_id;
|
||||
$setup->save();
|
||||
$this->assertEquals('100:10/0.0@a',our_address($ao)?->ftn);
|
||||
|
||||
$this->session_rc();
|
||||
//$this->session_nc();
|
||||
@@ -303,6 +306,7 @@ class RoutingTest extends TestCase
|
||||
|
||||
$ao = Address::findFTN('100:10/22.0@a');
|
||||
$this->assertEquals('100:10/20.0@a',$ao->parent()->ftn);
|
||||
Cache::forget('so');
|
||||
}
|
||||
|
||||
// A points parent is the node, if we have traffic for a point and we have session details for the node
|
||||
|
Reference in New Issue
Block a user