aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2012-11-09 01:17:16 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2012-11-09 01:17:16 +0100
commit42b8b279e62e6e2f5a7455e30bb0a211763ee187 (patch)
tree9d0e09c594f340a7ed9db8cc910a717890ef5f28 /tests
parente92b549c49833e3150d60e8773a6731fc49d1249 (diff)
downloadlibpam-x2go-42b8b279e62e6e2f5a7455e30bb0a211763ee187.tar.gz
libpam-x2go-42b8b279e62e6e2f5a7455e30bb0a211763ee187.tar.bz2
libpam-x2go-42b8b279e62e6e2f5a7455e30bb0a211763ee187.zip
fork libpam-x2go from libpam-freerdp
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am24
-rw-r--r--tests/mock_guest.c4
-rw-r--r--tests/test-freerdp-wrapper.cc16
3 files changed, 22 insertions, 22 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c257ac9..4ffa963 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -3,10 +3,10 @@ DISTCLEANFILES =
EXTRA_DIST =
TESTS = \
- test-freerdpclient-wrapper
+ test-pyhoca-wrapper
check_PROGRAMS = \
- test-freerdp-auth \
+ test-x2go-auth \
$(TESTS)
AM_CPPFLAGS = $(GTEST_CPPFLAGS) \
@@ -39,29 +39,29 @@ libgtest_a_CXXFLAGS = \
# Wrapper
##########################
-test_freerdp_wrapper: test-freerdp-auth
+test_x2go_wrapper: test-x2go-auth
-test_freerdpclient_wrapper_SOURCES = \
+test_pyhoca_wrapper_SOURCES = \
mock_pam.c mock_pam.h \
mock_guest.c mock_guest.h \
- test-freerdp-wrapper.cc
+ test-x2go-wrapper.cc
-test_freerdpclient_wrapper_LDADD = \
- $(top_builddir)/src/libfreerdpcore.la \
+test_pyhoca_wrapper_LDADD = \
+ $(top_builddir)/src/libx2gocore.la \
libgtest.a
-test_freerdpclient_wrapper_CXXFLAGS = \
+test_pyhoca_wrapper_CXXFLAGS = \
$(AM_CXXFLAGS) \
- -DAUTH_CHECK="\"$(abs_builddir)/test-freerdp-auth\"" \
+ -DAUTH_CHECK="\"$(abs_builddir)/test-x2go-auth\"" \
-I${top_srcdir}/src
-test_freerdpclient_wrapper_LDFLAGS = \
+test_pyhoca_wrapper_LDFLAGS = \
-pthread
##########################
# Auth tool
##########################
-test_freerdp_auth_SOURCES = \
- test-freerdp-auth.c
+test_x2go_auth_SOURCES = \
+ test-x2go-auth.c
diff --git a/tests/mock_guest.c b/tests/mock_guest.c
index 8bf2c3a..3327da0 100644
--- a/tests/mock_guest.c
+++ b/tests/mock_guest.c
@@ -68,7 +68,7 @@ void _exit (int exitcode)
#define BUFFER_SIZE 512
-/*Borrowed this code form socket-sucker.c in lightdm-remote-session-freerdp*/
+/*Borrowed this code form socket-sucker.c in lightdm-remote-session-x2go*/
int
socket_sucker ()
{
@@ -85,7 +85,7 @@ socket_sucker ()
serv_addr.sun_family = AF_UNIX;
- int printsize = snprintf(serv_addr.sun_path, sizeof(serv_addr.sun_path) - 1, "%s/%s", home, ".freerdp-socket");
+ int printsize = snprintf(serv_addr.sun_path, sizeof(serv_addr.sun_path) - 1, "%s/%s", home, ".x2go-socket");
if (printsize > sizeof(serv_addr.sun_path) - 1 || printsize < 0) {
return -1;
}
diff --git a/tests/test-freerdp-wrapper.cc b/tests/test-freerdp-wrapper.cc
index 147682d..67aca58 100644
--- a/tests/test-freerdp-wrapper.cc
+++ b/tests/test-freerdp-wrapper.cc
@@ -12,7 +12,7 @@ extern "C" {
#include "mock_pam.h"
#include "mock_guest.h"
- int freerdpclient_wrapper (int argc, char * argv[]);
+ int x2goclient_wrapper (int argc, char * argv[]);
const char * auth_check_path = AUTH_CHECK;
@@ -21,17 +21,17 @@ const char * auth_check_path = AUTH_CHECK;
namespace {
// The fixture for testing class Foo.
- class FreerdpclientWrapperTest : public ::testing::Test {
+ class PyhocaWrapperTest : public ::testing::Test {
protected:
// You can remove any or all of the following functions if its body
// is empty.
- FreerdpclientWrapperTest() {
+ PyhocaWrapperTest() {
// You can do set-up work for each test here.
setenv("HOME", "/tmp", 1 /* overwrite */);
}
- virtual ~FreerdpclientWrapperTest() {
+ virtual ~PyhocaWrapperTest() {
// You can do clean-up work that doesn't throw exceptions here.
}
@@ -41,24 +41,24 @@ namespace {
virtual void SetUp() {
// Code here will be called immediately after the constructor (right
// before each test).
- unlink("/tmp/.freerdp-socket");
+ unlink("/tmp/.x2go-socket");
}
virtual void TearDown() {
// Code here will be called immediately after each test (right
// before the destructor).
- unlink("/tmp/.freerdp-socket");
+ unlink("/tmp/.x2go-socket");
}
// Objects declared here can be used by all tests in the test case for Foo.
};
- TEST_F(FreerdpclientWrapperTest, canLinkTheWholeGang) {
+ TEST_F(PyhocaWrapperTest, canLinkTheWholeGang) {
EXPECT_EQ (1, 1); // right, that's trivial, but that means
// that I got all of the wrapper and pam to link there
}
- TEST_F(FreerdpclientWrapperTest, canCallPamOpenSession) {
+ TEST_F(PyhocaWrapperTest, canCallPamOpenSession) {
const char *argv[] = { NULL };
pam_handle_t *pamh = pam_handle_new ();