MCPcopy Create free account

hub / github.com/andrey-vk/wdbgp / functions

Functions1,274 in github.com/andrey-vk/wdbgp

FunctionTestRecordUserSnapshotEnabled
============================================================================= TestRecordUserSnapshotEnabled — RecordUserSnapshot with metrics enabled
internal/store/snapshots_test.go:287
FunctionTestRejectNewerDatabase
(t *testing.T)
internal/store/001_fresh_test.go:97
FunctionTestReplaceCatalogEntriesBatchBoundaries
TestReplaceCatalogEntriesBatchBoundaries covers counts at, just under, and just over entryInsertBatchSize, since an off-by-one in the chunk loop would
internal/store/dictionaries_test.go:32
FunctionTestReplaceCatalogEntriesRejectsInvalidCIDR
(t *testing.T)
internal/store/dictionaries_test.go:118
FunctionTestReplaceCatalogEntriesReplacesAndNormalizes
(t *testing.T)
internal/store/dictionaries_test.go:66
FunctionTestRequireUserSelfHealCSRFCookieHonorsProxyHTTPS
============================================================================= TestRequireUserSelfHealCSRFCookieHonorsProxyHTTPS / TestUserLogoutCookie
internal/web/handlers_api_user_test.go:138
FunctionTestResetBuiltInFeedAdapter
(t *testing.T)
internal/store/001_fresh_test.go:56
FunctionTestRestoreFromBackup
(t *testing.T)
internal/store/backup_test.go:277
FunctionTestRouteAnnouncement
============================================================================= Test 6: Route announcement =============================================
internal/bgp/session_test.go:352
FunctionTestRouteAnnouncementIPv6
TestRouteAnnouncementIPv6: announce IPv6 prefixes over an IPv6 BGP session.
internal/bgp/session_test.go:891
FunctionTestRouteAnnouncementToMultiplePeers
============================================================================= Test: Speaker announces route to multiple peers (same IP, different ASN)
internal/bgp/session_test.go:707
FunctionTestRouteFiltersJSONLowercaseKeys
TestRouteFiltersJSONLowercaseKeys guards against RouteFilters marshaling as "Allow"/"Deny" — the user SPA reads userData.filters?.allow/?.deny (lowerc
internal/store/routes_test.go:351
FunctionTestRouteWithdrawal
============================================================================= Test 7: Route withdrawal ===============================================
internal/bgp/session_test.go:404
FunctionTestRouteWithdrawalIPv6
TestRouteWithdrawalIPv6: withdraw IPv6 prefixes over IPv6 session.
internal/bgp/session_test.go:955
FunctionTestRunRejectsBadDBPathBeforeOpeningStore
TestRunRejectsBadDBPathBeforeOpeningStore guards against WDBGP_DB pointing at an unusable parent path (here: a path component that's a regular file, n
cmd/wdbgp/main_test.go:47
FunctionTestSPAAdminServesHTML
============================================================================= SPA serving tests ======================================================
internal/web/server_spa_test.go:50
FunctionTestSPAAssetsServed
(t *testing.T)
internal/web/server_spa_test.go:86
FunctionTestSPANotFoundFallback
(t *testing.T)
internal/web/server_spa_test.go:129
FunctionTestSPARootServesUserHTML
(t *testing.T)
internal/web/server_spa_test.go:68
FunctionTestSameIPDifferentASNs
============================================================================= Test 2: Same IP, different ASNs ========================================
internal/bgp/session_test.go:161
FunctionTestSameIPDifferentASNsIPv6
TestSameIPDifferentASNsIPv6: same IPv6 address, different ASNs.
internal/bgp/session_test.go:850
FunctionTestSameIPv4RequiresMatchingPassword
(t *testing.T)
internal/web/server_test.go:564
FunctionTestSameIPv6RequiresMatchingPassword
(t *testing.T)
internal/web/server_test.go:604
FunctionTestSaveFeedSnapshot
============================================================================= TestSaveFeedSnapshot — SaveFeedSnapshot with map[int64]int{1:500, 2:300}
internal/store/snapshots_test.go:161
FunctionTestSaveFeedSnapshotDedup
============================================================================= TestSaveFeedSnapshotDedup — Save same values twice → only 1 row ========
internal/store/snapshots_test.go:187
FunctionTestSaveSettingsInsertAndUpdate
(t *testing.T)
internal/store/store_auth_settings_test.go:503
FunctionTestSaveUserSnapshotDedup
============================================================================= TestSaveUserSnapshotDedup — Save same values twice → GetUserSnapshots re
internal/store/snapshots_test.go:38
FunctionTestSaveUserSnapshotRateLimit
============================================================================= TestSaveUserSnapshotRateLimit — Save different values immediately → GetU
internal/store/snapshots_test.go:63
FunctionTestSaveUserSnapshotStores
============================================================================= TestSaveUserSnapshotStores — SaveUserSnapshot → GetUserSnapshots returns
internal/store/snapshots_test.go:13
FunctionTestSecretSettingsDBKeys
(t *testing.T)
internal/settings/settings_test.go:585
FunctionTestSecretSettingsJSONReturnsNil
(t *testing.T)
internal/settings/settings_test.go:624
FunctionTestSecretSettingsJSONReturnsNil_DB
Test that even DB-stored secrets don't leak via JSON.
internal/settings/settings_test.go:670
FunctionTestSessionEstablished
============================================================================= Test 1: Basic session establishment ====================================
internal/bgp/session_test.go:145
FunctionTestSessionEstablishedIPv6
TestSessionEstablishedIPv6: basic BGP session over IPv6 loopback.
internal/bgp/session_test.go:817
FunctionTestSessionMaxAgeValidation
TestSessionMaxAgeValidation guards against session_max_age being settable to an absurdly large value (sessions that never meaningfully expire) or a ti
internal/settings/settings_test.go:892
FunctionTestSessionMaxAgeValidationRejectsInvalidEnvValue
(t *testing.T)
internal/settings/settings_test.go:921
FunctionTestSessionWith4ByteASN
============================================================================= Test: 4-byte ASN session with AS4 capability negotiation ===============
internal/bgp/session_test.go:1101
FunctionTestSetCommunityInsertAndUpdate
(t *testing.T)
internal/store/store_auth_settings_test.go:568
FunctionTestSetCommunityRejectsDuplicateNumber
(t *testing.T)
internal/store/store_auth_settings_test.go:614
FunctionTestSetUserCredentialAddNewUpdatePasswordDelete
============================================================================= SetUserCredential ======================================================
internal/store/store_auth_settings_test.go:312
FunctionTestSetVisibleUserSelectionPreservesDisabledOnlySelections
(t *testing.T)
internal/store/catalog_test.go:216
FunctionTestSettingsNullValueDeletesOverride
TestSettingsNullValueDeletesOverride verifies that sending null for a setting key removes it from the database (use default / clear override).
internal/web/server_test.go:747
FunctionTestSettingsPersistAfterSet
(t *testing.T)
internal/settings/settings_test.go:505
FunctionTestSettings_ComputedDefaults
(t *testing.T)
internal/settings/settings_test.go:566
FunctionTestSettings_EnvOnlyField_Set
(t *testing.T)
internal/settings/settings_test.go:396
FunctionTestSettings_JSON
(t *testing.T)
internal/settings/settings_test.go:445
FunctionTestSettings_JSON_EnvSet
(t *testing.T)
internal/settings/settings_test.go:484
FunctionTestSettings_OnChange
(t *testing.T)
internal/settings/settings_test.go:409
FunctionTestSettings_SetAndReset
(t *testing.T)
internal/settings/settings_test.go:371
FunctionTestSimpleSetting_ConcurrentGet
(t *testing.T)
internal/settings/setting_test.go:355
FunctionTestSimpleSetting_EmptyEnvVar
(t *testing.T)
internal/settings/setting_test.go:372
FunctionTestSimpleSetting_Env_RunsValidator
TestSimpleSetting_Env_RunsValidator guards against a regression where newSimple returned as soon as the env var parsed, before ever reaching the valid
internal/settings/setting_test.go:313
FunctionTestSimpleSetting_GetSetReset
(t *testing.T)
internal/settings/setting_test.go:150
FunctionTestSimpleSetting_Int_Basic
(t *testing.T)
internal/settings/setting_test.go:267
FunctionTestSimpleSetting_Int_Env
(t *testing.T)
internal/settings/setting_test.go:287
FunctionTestSimpleSetting_Int_InvalidEnv
(t *testing.T)
internal/settings/setting_test.go:299
FunctionTestSimpleSetting_JSON_DBSet
(t *testing.T)
internal/settings/setting_test.go:233
FunctionTestSimpleSetting_JSON_Default
(t *testing.T)
internal/settings/setting_test.go:215
FunctionTestSimpleSetting_JSON_EnvSet
(t *testing.T)
internal/settings/setting_test.go:251
FunctionTestSimpleSetting_New_DBValue
(t *testing.T)
internal/settings/setting_test.go:108
FunctionTestSimpleSetting_New_EnvFalse
(t *testing.T)
internal/settings/setting_test.go:87
FunctionTestSimpleSetting_New_EnvTrue
(t *testing.T)
internal/settings/setting_test.go:72
FunctionTestSimpleSetting_New_EnvWinsOverDB
(t *testing.T)
internal/settings/setting_test.go:123
FunctionTestSimpleSetting_New_InvalidDBIgnored
(t *testing.T)
internal/settings/setting_test.go:139
FunctionTestSimpleSetting_New_InvalidEnv
(t *testing.T)
internal/settings/setting_test.go:99
FunctionTestSimpleSetting_New_NoEnvNoDB
============================================================================= simpleSetting tests ====================================================
internal/settings/setting_test.go:55
FunctionTestSimpleSetting_OnChange
(t *testing.T)
internal/settings/setting_test.go:386
FunctionTestSimpleSetting_OnChange_Reset
(t *testing.T)
internal/settings/setting_test.go:422
FunctionTestSimpleSetting_ResetOnEnv
(t *testing.T)
internal/settings/setting_test.go:203
FunctionTestSimpleSetting_Reset_PersistsBeforeMutating
TestSimpleSetting_Reset_PersistsBeforeMutating is the Reset-side counterpart of TestSimpleSetting_Set_PersistsBeforeMutating.
internal/settings/setting_test.go:501
FunctionTestSimpleSetting_SetOnEnv
(t *testing.T)
internal/settings/setting_test.go:191
FunctionTestSimpleSetting_Set_PersistsBeforeMutating
TestSimpleSetting_Set_PersistsBeforeMutating guards against a failed SaveSetting leaving Get() returning a value the store never actually received — t
internal/settings/setting_test.go:451
FunctionTestSimpleSetting_String_Basic
(t *testing.T)
internal/settings/setting_test.go:335
FunctionTestSimpleSetting_Validate_DoesNotMutate
TestSimpleSetting_Validate_DoesNotMutate proves Validate is a pure dry-run: an invalid value is rejected, a valid one is accepted, and either way Get(
internal/settings/setting_test.go:471
FunctionTestSpeakerPeerStatesEmpty
(t *testing.T)
internal/bgp/speaker_test.go:91
FunctionTestSpeakerSetPeers
(t *testing.T)
internal/bgp/speaker_test.go:33
FunctionTestSpeakerStartStop
(t *testing.T)
internal/bgp/speaker_test.go:12
FunctionTestSplitNewlines
(t *testing.T)
internal/store/routes_test.go:271
FunctionTestStatusEndpoint
============================================================================= Status endpoint ========================================================
internal/web/server_test.go:128
FunctionTestSyncAllSkipsDisabledFeeds
(t *testing.T)
internal/feeds/feeds_test.go:388
FunctionTestSyncDiscardsDownloadWhenFeedURLChanges
(t *testing.T)
internal/feeds/feeds_test.go:445
FunctionTestSyncDiscardsResultWhenAdapterChanges
(t *testing.T)
internal/feeds/feeds_test.go:511
FunctionTestSyncIPRangesFeedStoresModeCatalog
(t *testing.T)
internal/feeds/feeds_test.go:566
FunctionTestSyncIntervalValidation
(t *testing.T)
internal/settings/settings_test.go:807
FunctionTestSyncLoopReloadsIntervalLive
TestSyncLoopReloadsIntervalLive guards against a bug where sync_interval saved through the settings API had no runtime effect until a full process res
cmd/wdbgp/sync_loop_test.go:49
FunctionTestToggleSelections
(t *testing.T)
internal/store/dictionaries_test.go:153
FunctionTestTransientError_Detection
(t *testing.T)
internal/retry/retry_test.go:124
FunctionTestTranslationCatalogsHaveMatchingKeys
============================================================================= Translation / i18n =====================================================
internal/web/server_test.go:338
FunctionTestUpdateFeedURLClearsSnapshotAndDeleteCascades
(t *testing.T)
internal/store/feeds_test.go:67
FunctionTestUpdatePeerClearsRoutesOnPasswordChange
TestUpdatePeerClearsRoutesOnPasswordChange guards against a stale peerRoutes cache after a peer session gets recreated for a reason other than an IP/A
internal/bgp/manager_test.go:635
FunctionTestUpdatePeerRejectsDuplicatePeerIPASNOnFirstTrack
TestUpdatePeerRejectsDuplicatePeerIPASNOnFirstTrack guards UpdatePeer's "not yet tracked" branch (a user ID the manager hasn't seen before — e.g. a pe
internal/bgp/manager_test.go:692
FunctionTestUpdateUserAllowsReactivatingNonConflictingNetworks
(t *testing.T)
internal/web/handlers_api_users_test.go:2099
FunctionTestUpdateUserInvalidWebAuth
============================================================================= TestUpdateUserInvalidWebAuth — PUT with invalid web_auth returns 400 ===
internal/web/handlers_api_users_test.go:1808
FunctionTestUpdateUserRejectsInvalidNextHop
TestUpdateUserRejectsInvalidNextHop mirrors TestCreateUserRejectsInvalidNextHop for the partial-update path.
internal/web/handlers_api_users_test.go:2172
FunctionTestUpdateUserRejectsMalformedFilterWithoutMutatingUser
TestUpdateUserRejectsMalformedFilterWithoutMutatingUser mirrors the create case for the partial-update path: a malformed filter CIDR must be caught be
internal/web/handlers_api_users_test.go:2238
FunctionTestUpdateUserRejectsReactivatingConflictingNetworks
(t *testing.T)
internal/web/handlers_api_users_test.go:2048
FunctionTestUpdateUserRejectsUnnormalizedNetworks
(t *testing.T)
internal/web/handlers_api_users_test.go:1893
FunctionTestUpdateUserWebAuthChanges
(t *testing.T)
internal/store/store_auth_settings_test.go:407
FunctionTestUserAuthBothRequiresBothFactors
============================================================================= TestUserAuthBothRequiresBothFactors — web_auth=both requires IP + cookie
internal/web/handlers_api_user_test.go:22
FunctionTestUserAuthLoginModeCookieOnly
============================================================================= TestUserAuthLoginModeCookieOnly — a web_auth=login user must be able to
internal/web/handlers_api_user_test.go:95
← previousnext →1,001–1,100 of 1,274, ranked by callers