SVCS - English Documentation
Loading...
Searching...
No Matches
SSHServerTest.cxx File Reference

Unit tests for SSHServer class. More...

#include "../../server/include/SSHServer.hxx"
#include "../../server/include/SSHConfig.hxx"
#include "../../core/include/RepositoryManager.hxx"
#include "../../services/EventBus.hxx"
#include <gtest/gtest.h>
#include <memory>
#include <filesystem>
#include <fstream>
#include <thread>
#include <chrono>

Classes

class  svcs::test::server::ssh::MockEventBus
struct  svcs::test::server::ssh::MockEventBus::EventRecord
class  svcs::test::server::ssh::SSHServerTest
class  svcs::test::server::ssh::SSHServerNoLibSSHTest
class  svcs::test::server::ssh::SSHServerIntegrationTest

Namespaces

namespace  svcs::test
 Comprehensive testing framework for SVCS version control system.
namespace  svcs::test::server
 Server component testing.
namespace  svcs::test::server::ssh
 SSH-specific test functionality.

Macros

#define LIBSSH_AVAILABLE   1

Functions

std::string svcs::test::server::ssh::test_utils::hashPassword (const std::string &password)
bool svcs::test::server::ssh::test_utils::writePasswordFile (const std::string &path, const std::map< std::string, std::string > &users)
std::map< std::string, std::string > svcs::test::server::ssh::test_utils::readPasswordFile (const std::string &path)
void svcs::test::server::ssh::test_utils::writeAuthorizedKey (const std::string &username, const std::string &public_key, const std::string &keys_dir)
 svcs::test::server::ssh::TEST_F (SSHServerTest, Constructor)
 svcs::test::server::ssh::TEST_F (SSHServerTest, DestructorStopsServer)
 svcs::test::server::ssh::TEST_F (SSHServerTest, InvalidConfigNoHostKey)
 svcs::test::server::ssh::TEST_F (SSHServerTest, InvalidPort)
 svcs::test::server::ssh::TEST_F (SSHServerTest, AddUserKeyCreatesFile)
 svcs::test::server::ssh::TEST_F (SSHServerTest, AddUserKeyEmptyParameters)
 svcs::test::server::ssh::TEST_F (SSHServerTest, SetUserPasswordCreatesFile)
 svcs::test::server::ssh::TEST_F (SSHServerTest, ActiveConnectionsInitiallyZero)
 svcs::test::server::ssh::TEST_F (SSHServerTest, DirectoryCreationInConstructor)
 svcs::test::server::ssh::TEST_F (SSHServerNoLibSSHTest, ConfigValidation)
 svcs::test::server::ssh::TEST_F (SSHServerNoLibSSHTest, ConfigSaveLoad)
 svcs::test::server::ssh::TEST_F (SSHServerNoLibSSHTest, ConfigLoadInvalidFile)
 svcs::test::server::ssh::TEST_F (SSHServerNoLibSSHTest, TestHashPassword)
 svcs::test::server::ssh::TEST_F (SSHServerNoLibSSHTest, PasswordFileOperations)
 svcs::test::server::ssh::TEST_F (SSHServerNoLibSSHTest, WriteAuthorizedKey)
 svcs::test::server::ssh::TEST_F (SSHServerNoLibSSHTest, RepositoryManagerCreation)
 svcs::test::server::ssh::TEST_F (SSHServerIntegrationTest, FullStartStopCycle)

Detailed Description

Unit tests for SSHServer class.

Tests for SSH server lifecycle, connection management, and command handling

Unit tests for SSHServer class

Comprehensive test suite for SSH server initialization, client handling, authentication, and SVCS command execution through SSH protocol.