LCOV - code coverage report
Current view: top level - tests/cmocka - common_mock_be.c (source / functions) Hit Total Coverage
Test: .coverage.total Lines: 8 8 100.0 %
Date: 2015-10-19 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /*
       2             :     Authors:
       3             :         Jakub Hrozek <jhrozek@redhat.com>
       4             : 
       5             :     Copyright (C) 2015 Red Hat
       6             : 
       7             :     SSSD tests: Fake back end
       8             : 
       9             :     This program is free software; you can redistribute it and/or modify
      10             :     it under the terms of the GNU General Public License as published by
      11             :     the Free Software Foundation; either version 3 of the License, or
      12             :     (at your option) any later version.
      13             : 
      14             :     This program is distributed in the hope that it will be useful,
      15             :     but WITHOUT ANY WARRANTY; without even the implied warranty of
      16             :     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      17             :     GNU General Public License for more details.
      18             : 
      19             :     You should have received a copy of the GNU General Public License
      20             :     along with this program.  If not, see <http://www.gnu.org/licenses/>.
      21             : */
      22             : 
      23             : #include "util/util.h"
      24             : #include "tests/cmocka/common_mock_resp.h"
      25             : 
      26          51 : struct be_ctx *mock_be_ctx(TALLOC_CTX *mem_ctx, struct sss_test_ctx *tctx)
      27             : {
      28             :     struct be_ctx *be_ctx;
      29             : 
      30          51 :     be_ctx = talloc_zero(mem_ctx, struct be_ctx);
      31          51 :     assert_non_null(be_ctx);
      32             : 
      33          51 :     be_ctx->cdb = tctx->confdb;
      34          51 :     be_ctx->ev  = tctx->ev;
      35          51 :     be_ctx->domain  = tctx->dom;
      36          51 :     be_ctx->conf_path = tctx->conf_dom_path;
      37             : 
      38          51 :     return be_ctx;
      39             : }

Generated by: LCOV version 1.10