dash, tests
This commit is contained in:
@@ -172,13 +172,13 @@ 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):
|
||||
"Tracker enables billing with default db when requested\n\nTags: billing, http, payments"
|
||||
def test_tracker_enables_billing_with_default_db(tmp_path, monkeypatch):
|
||||
"Tracker enables billing with default db by default\n\nTags: billing, http, payments"
|
||||
|
||||
from meshnet_tracker.billing import DEFAULT_BILLING_DB_PATH
|
||||
|
||||
monkeypatch.chdir(tmp_path)
|
||||
tracker = TrackerServer(enable_billing=True)
|
||||
tracker = TrackerServer()
|
||||
port = tracker.start()
|
||||
try:
|
||||
# /v1/billing/summary is admin-gated now; just confirm the server is up.
|
||||
@@ -329,6 +329,7 @@ def billed_tracker():
|
||||
}
|
||||
},
|
||||
billing=ledger,
|
||||
enable_billing=False,
|
||||
hive_secret=HIVE_SECRET,
|
||||
)
|
||||
port = tracker.start()
|
||||
@@ -457,6 +458,7 @@ def test_proxy_chat_caps_inflated_streaming_usage_by_observed_chunks():
|
||||
}
|
||||
},
|
||||
billing=ledger,
|
||||
enable_billing=False,
|
||||
)
|
||||
port = tracker.start()
|
||||
tracker_url = f"http://127.0.0.1:{port}"
|
||||
@@ -506,6 +508,7 @@ def test_proxy_chat_splits_payout_by_tracker_assigned_route_span():
|
||||
}
|
||||
},
|
||||
billing=ledger,
|
||||
enable_billing=False,
|
||||
)
|
||||
port = tracker.start()
|
||||
tracker_url = f"http://127.0.0.1:{port}"
|
||||
@@ -582,6 +585,7 @@ def test_proxy_chat_rejects_request_above_spend_cap_before_routing():
|
||||
}
|
||||
},
|
||||
billing=ledger,
|
||||
enable_billing=False,
|
||||
max_charge_per_request=0.01,
|
||||
)
|
||||
port = tracker.start()
|
||||
@@ -656,6 +660,7 @@ def test_proxy_chat_records_validation_event_with_plain_route_metadata():
|
||||
}
|
||||
},
|
||||
contracts=contracts,
|
||||
enable_billing=False,
|
||||
)
|
||||
port = tracker.start()
|
||||
tracker_url = f"http://127.0.0.1:{port}"
|
||||
|
||||
Reference in New Issue
Block a user