From 462db32918a05097652f8232cd6c8d78a826e63c Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Fri, 25 Jul 2014 11:32:58 +0200 Subject: test_utils: Use common header file for libsss_util tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Pavel Reichl Reviewed-by: Michal Židek --- src/tests/cmocka/test_sss_ssh.c | 1 + src/tests/cmocka/test_utils.c | 2 +- src/tests/cmocka/test_utils.h | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/tests/cmocka/test_utils.h (limited to 'src/tests/cmocka') diff --git a/src/tests/cmocka/test_sss_ssh.c b/src/tests/cmocka/test_sss_ssh.c index 03d95dbc8..10e1af716 100644 --- a/src/tests/cmocka/test_sss_ssh.c +++ b/src/tests/cmocka/test_sss_ssh.c @@ -23,6 +23,7 @@ #include "util/util.h" #include "util/sss_ssh.h" #include "tests/cmocka/common_mock.h" +#include "test_utils.h" uint8_t key_data_noLF[] = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfymad64oZkWa6q3xLXmCt/LfCRnd6yZSDp7UK6Irx5/Dv69dEKK2kBGL9Wfn+3ZDa6ov2XZrBmUthh8KOJvTw72+axox3kcJ5HwOYZCMeKbcr10RNScGuHErA1HhjTY6M9L8d0atVH2QIxw7ZHoVVnTHC4U4+541YfJkNUiOUIj65cFFZm9ULp32ZPrK+j2wW+XZkHhrZeFMlg4x4fe5FocO6ik1eqLxBejo7tMy+1m3R2a795AIguf6vNWeE5aNMd4pcmPcZHb3JOq3ItzE/3lepXD/3wqMt36EqNykBVE7aJj+LVkcEgjP9CDDsg9j9NB+AuWYmIYqrHW/Rg/vJ developer@sssd.dev.work"; diff --git a/src/tests/cmocka/test_utils.c b/src/tests/cmocka/test_utils.c index 2254c0a7c..c1dfb66e1 100644 --- a/src/tests/cmocka/test_utils.c +++ b/src/tests/cmocka/test_utils.c @@ -24,6 +24,7 @@ #include "tests/cmocka/common_mock.h" #include "util/sss_nss.h" +#include "test_utils.h" #define TESTS_PATH "tests_utils" #define TEST_CONF_DB "test_utils_conf.ldb" @@ -52,7 +53,6 @@ struct dom_list_test_ctx { struct sss_domain_info *dom_list; }; -void test_textual_public_key(void **state); void setup_dom_list(void **state) { diff --git a/src/tests/cmocka/test_utils.h b/src/tests/cmocka/test_utils.h new file mode 100644 index 000000000..8f6269305 --- /dev/null +++ b/src/tests/cmocka/test_utils.h @@ -0,0 +1,29 @@ +/* + Authors: + Lukas Slebodnik + + Copyright (C) 2014 Red Hat + + SSSD tests: Tests for utility functions + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef __TESTS__CMOCKA__TEST_UTILS_H__ +#define __TESTS__CMOCKA__TEST_UTILS_H__ + +/* from src/tests/cmocka/test_sss_ssh.c */ +void test_textual_public_key(void **state); + +#endif /* __TESTS__CMOCKA__TEST_UTILS_H__ */ -- cgit