mirror of
https://github.com/falk-werner/webfuse-provider
synced 2026-03-02 04:09:18 +00:00
added test using TLS connection
This commit is contained in:
@@ -23,5 +23,25 @@ TEST(Client, Connect)
|
||||
|
||||
server.AwaitConnection();
|
||||
|
||||
wfp_client_config_dispose(config);
|
||||
}
|
||||
|
||||
TEST(Client, ConnectWithTls)
|
||||
{
|
||||
MockProviderClient provider;
|
||||
EXPECT_CALL(provider, OnConnected()).Times(1);
|
||||
EXPECT_CALL(provider, OnDisconnected()).Times(1);
|
||||
|
||||
wfp_client_config * config = wfp_client_config_create();
|
||||
wfp_client_config_set_certpath(config, "client-cert.pem");
|
||||
wfp_client_config_set_keypath(config, "client-key.pem");
|
||||
wfp_client_config_set_ca_filepath(config, "server-cert.pem");
|
||||
provider.AttachTo(config);
|
||||
|
||||
WebfuseServer server(true);
|
||||
Client client(config, server.GetUrl());
|
||||
|
||||
server.AwaitConnection();
|
||||
|
||||
wfp_client_config_dispose(config);
|
||||
}
|
||||
Reference in New Issue
Block a user