diff options
| author | Your Name <you@example.com> | 2026-05-17 04:50:07 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-17 04:50:07 +0530 |
| commit | edd125d0e3fe5fe7c0edf30c429723f3b0120c68 (patch) | |
| tree | 5b1134ad7a6cfce7adeb46f5069e33b509ce9751 /tests/unit/Makefile | |
| parent | cb4bd7d7c10cadcb43f82c09b13ffed744e541f7 (diff) | |
feat(phase6): bytes-based billing - dual metric support
- session_create_bytes() + session_add_bytes() for bytes-metric sessions
- session_is_expired() dispatches on config metric (bytes vs milliseconds)
- cashu_calculate_allotment() unified dispatcher for both metrics
- tollgate_api discovery/usage/session_event use configured metric
- config: metric field defaults to 'bytes', step_size_bytes=22020096 (21MB)
- 14 new unit tests (148 total passing)
- ASSERT_EQ_UINT64 macro added to test framework
Diffstat (limited to 'tests/unit/Makefile')
| -rw-r--r-- | tests/unit/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/Makefile b/tests/unit/Makefile index f31172b..53bcc2c 100644 --- a/tests/unit/Makefile +++ b/tests/unit/Makefile | |||
| @@ -59,8 +59,8 @@ test_nostr_event: test_nostr_event.c $(REPO_ROOT)/main/nostr_event.c $(REPO_ROOT | |||
| 59 | test_cashu: test_cashu.c $(REPO_ROOT)/main/cashu.c | 59 | test_cashu: test_cashu.c $(REPO_ROOT)/main/cashu.c |
| 60 | $(CC) $(CFLAGS) $< $(REPO_ROOT)/main/cashu.c -o $@ $(LDFLAGS) | 60 | $(CC) $(CFLAGS) $< $(REPO_ROOT)/main/cashu.c -o $@ $(LDFLAGS) |
| 61 | 61 | ||
| 62 | test_session: test_session.c $(REPO_ROOT)/main/session.c | 62 | test_session: test_session.c $(REPO_ROOT)/main/session.c $(REPO_ROOT)/main/cashu.c |
| 63 | $(CC) $(CFLAGS) $< $(REPO_ROOT)/main/session.c -o $@ $(LDFLAGS) | 63 | $(CC) $(CFLAGS) $< $(REPO_ROOT)/main/session.c $(REPO_ROOT)/main/cashu.c -o $@ $(LDFLAGS) |
| 64 | 64 | ||
| 65 | test_tollgate_client: test_tollgate_client.c | 65 | test_tollgate_client: test_tollgate_client.c |
| 66 | $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) | 66 | $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) |