diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2012-11-09 20:41:52 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2012-11-09 20:41:52 +0100 |
commit | a9a228ea6e6d0b8d17c463ad05bbc1b7a9f0c3c5 (patch) | |
tree | fc7602ae7a8eecd1d7adae20eb3d6eebc6c90128 /tests/test-freerdp-wrapper.cc | |
parent | ec6ec5d046dbf8bf0efa5ad680f1acfbe2daaa6f (diff) | |
download | libpam-x2go-a9a228ea6e6d0b8d17c463ad05bbc1b7a9f0c3c5.tar.gz libpam-x2go-a9a228ea6e6d0b8d17c463ad05bbc1b7a9f0c3c5.tar.bz2 libpam-x2go-a9a228ea6e6d0b8d17c463ad05bbc1b7a9f0c3c5.zip |
fix tests
Diffstat (limited to 'tests/test-freerdp-wrapper.cc')
-rw-r--r-- | tests/test-freerdp-wrapper.cc | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/tests/test-freerdp-wrapper.cc b/tests/test-freerdp-wrapper.cc deleted file mode 100644 index 67aca58..0000000 --- a/tests/test-freerdp-wrapper.cc +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright © 2012 Canonical Ltd. All rights reserved. - * - * Author(s): David Barth <david.barth@canonical.com> - * - */ - -#include <gtest/gtest.h> - -extern "C" { - -#include "mock_pam.h" -#include "mock_guest.h" - - int x2goclient_wrapper (int argc, char * argv[]); - -const char * auth_check_path = AUTH_CHECK; - -} - -namespace { - - // The fixture for testing class Foo. - class PyhocaWrapperTest : public ::testing::Test { - protected: - // You can remove any or all of the following functions if its body - // is empty. - - PyhocaWrapperTest() { - // You can do set-up work for each test here. - setenv("HOME", "/tmp", 1 /* overwrite */); - } - - virtual ~PyhocaWrapperTest() { - // You can do clean-up work that doesn't throw exceptions here. - } - - // If the constructor and destructor are not enough for setting up - // and cleaning up each test, you can define the following methods: - - virtual void SetUp() { - // Code here will be called immediately after the constructor (right - // before each test). - unlink("/tmp/.x2go-socket"); - } - - virtual void TearDown() { - // Code here will be called immediately after each test (right - // before the destructor). - unlink("/tmp/.x2go-socket"); - } - - // Objects declared here can be used by all tests in the test case for Foo. - }; - - 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(PyhocaWrapperTest, canCallPamOpenSession) { - const char *argv[] = { NULL }; - - pam_handle_t *pamh = pam_handle_new (); - - EXPECT_EQ (PAM_SUCCESS, - pam_sm_authenticate (pamh, 0, 0, argv)); - EXPECT_EQ (PAM_SUCCESS, - pam_sm_setcred (pamh, 0, 0, argv)); - - EXPECT_EQ (PAM_SUCCESS, - pam_sm_open_session (pamh, 0, 0, argv)); - EXPECT_EQ(0, socket_sucker()); - EXPECT_EQ (PAM_SUCCESS, - pam_sm_close_session (pamh, 0, 0, argv)); - } - -} |