summaryrefslogtreecommitdiffstats
path: root/src/tests/cmocka
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-07-25 11:32:58 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-07-28 10:11:12 +0200
commit462db32918a05097652f8232cd6c8d78a826e63c (patch)
treefd991158b57fea8faab020268d7241383f3c066e /src/tests/cmocka
parentdfb2960ab251f609466fa660449703835c97f99a (diff)
downloadsssd-462db32918a05097652f8232cd6c8d78a826e63c.tar.gz
sssd-462db32918a05097652f8232cd6c8d78a826e63c.tar.xz
sssd-462db32918a05097652f8232cd6c8d78a826e63c.zip
test_utils: Use common header file for libsss_util tests.
Reviewed-by: Pavel Reichl <preichl@redhat.com> Reviewed-by: Michal Židek <mzidek@redhat.com>
Diffstat (limited to 'src/tests/cmocka')
-rw-r--r--src/tests/cmocka/test_sss_ssh.c1
-rw-r--r--src/tests/cmocka/test_utils.c2
-rw-r--r--src/tests/cmocka/test_utils.h29
3 files changed, 31 insertions, 1 deletions
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 <lslebodn@redhat.com>
+
+ 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 <http://www.gnu.org/licenses/>.
+*/
+
+#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__ */