netconf_env_unittest.cc 836 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

/// @brief Basic environment tests for netconf


#include <sysrepo-cpp/Session.h>
#include <gtest/gtest.h>

class NetconfTest : public ::testing::Test {
public:

    NetconfTest() {}

};

// This test checks if a session to sysrepo can be established.
// It uses sysrepo code directly, so it's a sanity check for the
// environment. Doesn't test any Kea code.
TEST_F(NetconfTest, environmentSanity) {

    S_Connection conn;

    ASSERT_NO_THROW(conn.reset(new Connection("kea-netconf")));

    S_Session sess;

    ASSERT_NO_THROW(sess.reset(new Session(conn)));
}