skills update; USER ACCOUNT system! Alpha!
This commit is contained in:
@@ -103,6 +103,22 @@ def test_restart_persistence(tmp_path):
|
||||
assert reloaded.snapshot()["protocol_cut"] == pytest.approx(0.02 * 0.10)
|
||||
|
||||
|
||||
def test_tracker_enables_billing_with_default_db_when_requested(tmp_path, monkeypatch):
|
||||
from meshnet_tracker.billing import DEFAULT_BILLING_DB_PATH
|
||||
|
||||
monkeypatch.chdir(tmp_path)
|
||||
tracker = TrackerServer(enable_billing=True)
|
||||
port = tracker.start()
|
||||
try:
|
||||
summary = json.loads(
|
||||
urllib.request.urlopen(f"http://127.0.0.1:{port}/v1/billing/summary").read()
|
||||
)
|
||||
assert "protocol_cut" in summary
|
||||
finally:
|
||||
tracker.stop()
|
||||
assert (tmp_path / DEFAULT_BILLING_DB_PATH).exists()
|
||||
|
||||
|
||||
def test_event_replication_converges_and_dedupes():
|
||||
leader = BillingLedger(starting_credit=1.0, default_price_per_1k=0.02)
|
||||
follower = BillingLedger(starting_credit=1.0, default_price_per_1k=0.02)
|
||||
|
||||
Reference in New Issue
Block a user