mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-26 23:52:51 +08:00
130 lines
3.7 KiB
Bash
Executable File
130 lines
3.7 KiB
Bash
Executable File
# shellcheck shell=sh
|
|
|
|
Describe 'SafeShield statistics behavior'
|
|
It 'collects global and per-device DNS statistics'
|
|
When call ss_case_statistics
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'calculates deltas from dnsmasq cumulative UBus counters'
|
|
When call ss_case_statistics_ubus_source
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'restores persistent state and handles volatile mode metadata'
|
|
When call ss_case_statistics_persistence
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'replays, compacts, and validates the statistics journal'
|
|
When call ss_case_statistics_journal
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'does not replay journal transactions older than the persistent base'
|
|
When call ss_case_statistics_stale_journal
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'excludes internal loopback DNS health checks from statistics'
|
|
When call ss_case_statistics_internal_queries
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'keeps a generation stable while collector sessions restart'
|
|
When call ss_case_statistics_generation
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'keeps snapshot sequences monotonic across restart and persistent recovery'
|
|
When call ss_case_statistics_snapshot_sequence
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'uses snapshot sequence instead of wall clock to choose recovery state'
|
|
When call ss_case_statistics_snapshot_freshness
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'replays newer journal transactions by snapshot sequence across NTP rollback'
|
|
When call ss_case_statistics_journal_sequence_freshness
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'does not compare snapshot sequence numbers across different generations'
|
|
When call ss_case_statistics_generation_sequence_scope
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'keeps unresolved IPv6 clients as explicit temporary identities'
|
|
When call ss_case_statistics_ipv6_identity
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
It 'merges IPv6 privacy addresses through the kernel neighbor identity'
|
|
When call ss_case_statistics_ipv6_neighbor_identity
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'merges private MAC rotation by DHCP client identifier'
|
|
When call ss_case_statistics_dhcp_client_id_identity
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'merges IPv6 private MAC rotation by DHCPv6 DUID'
|
|
When call ss_case_statistics_ipv6_duid_identity
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'uses conservative hostname fallback for historical MAC identities'
|
|
When call ss_case_statistics_hostname_identity
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'projects a recent upload window with internally consistent totals'
|
|
When call ss_case_statistics_upload_projection
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
It 'loads the statistics collector from focused awk modules'
|
|
When call ss_case_statistics_modules
|
|
The status should be success
|
|
The output should equal ''
|
|
The error should equal ''
|
|
End
|
|
|
|
End
|