LCOV - differential code coverage report
Current view: top level - src/test/modules/oauth_validator - fail_validator.c (source / functions) Coverage Total Hit UBC
Current: d36b728949bf4e37ada1cd23e0f2aaa94f609a70 vs 52e118fe2f7e3381bdaa479816a7f72eda2ae517 Lines: 0.0 % 5 0 5
Current Date: 2026-06-29 16:15:13 +0200 Functions: 0.0 % 3 0 3
Baseline: lcov-20260630-baseline Branches: 0.0 % 2 0 2
Baseline Date: 2026-06-29 13:01:57 +0200 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(360..) days: 0.0 % 5 0 5
Function coverage date bins:
(360..) days: 0.0 % 3 0 3
Branch coverage date bins:
(360..) days: 0.0 % 2 0 2

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*-------------------------------------------------------------------------
                                  2                 :                :  *
                                  3                 :                :  * fail_validator.c
                                  4                 :                :  *    Test module for serverside OAuth token validation callbacks, which is
                                  5                 :                :  *    guaranteed to always fail in the validation callback
                                  6                 :                :  *
                                  7                 :                :  * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
                                  8                 :                :  * Portions Copyright (c) 1994, Regents of the University of California
                                  9                 :                :  *
                                 10                 :                :  * src/test/modules/oauth_validator/fail_validator.c
                                 11                 :                :  *
                                 12                 :                :  *-------------------------------------------------------------------------
                                 13                 :                :  */
                                 14                 :                : 
                                 15                 :                : #include "postgres.h"
                                 16                 :                : 
                                 17                 :                : #include "fmgr.h"
                                 18                 :                : #include "libpq/oauth.h"
                                 19                 :                : 
  495 dgustafsson@postgres       20                 :UBC           0 : PG_MODULE_MAGIC;
                                 21                 :                : 
                                 22                 :                : static bool fail_token(const ValidatorModuleState *state,
                                 23                 :                :                        const char *token,
                                 24                 :                :                        const char *role,
                                 25                 :                :                        ValidatorModuleResult *res);
                                 26                 :                : 
                                 27                 :                : /* Callback implementations (we only need the main one) */
                                 28                 :                : static const OAuthValidatorCallbacks validator_callbacks = {
                                 29                 :                :     PG_OAUTH_VALIDATOR_MAGIC,
                                 30                 :                : 
                                 31                 :                :     .validate_cb = fail_token,
                                 32                 :                : };
                                 33                 :                : 
                                 34                 :                : const OAuthValidatorCallbacks *
                                 35                 :              0 : _PG_oauth_validator_module_init(void)
                                 36                 :                : {
                                 37                 :              0 :     return &validator_callbacks;
                                 38                 :                : }
                                 39                 :                : 
                                 40                 :                : static bool
                                 41                 :              0 : fail_token(const ValidatorModuleState *state,
                                 42                 :                :            const char *token, const char *role,
                                 43                 :                :            ValidatorModuleResult *res)
                                 44                 :                : {
                                 45         [ #  # ]:              0 :     elog(FATAL, "fail_validator: sentinel error");
                                 46                 :                :     pg_unreachable();
                                 47                 :                : }
        

Generated by: LCOV version 2.0-1