File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 30
30
#include < multipass/vm_image_host.h>
31
31
#include < multipass/vm_image_vault.h>
32
32
33
+ #include " mock_environment_helpers.h"
33
34
#include " mock_virtual_machine_factory.h"
34
35
#include " stub_cert_store.h"
35
36
#include " stub_certprovider.h"
@@ -367,6 +368,23 @@ TEST_F(Daemon, failed_restart_command_returns_fulfilled_promise)
367
368
EXPECT_TRUE (is_ready (status_promise.get_future ()));
368
369
}
369
370
371
+ TEST_F (Daemon, proxy_contains_valid_info)
372
+ {
373
+ QString username{" username" };
374
+ QString password{" password" };
375
+ QString hostname{" 192.168.1.1" };
376
+ qint16 port{3128 };
377
+ QString proxy = QString (" %1:%2@%3:%4" ).arg (username).arg (password).arg (hostname).arg (port);
378
+
379
+ mpt::SetEnvScope env (" http_proxy" , proxy.toUtf8 ());
380
+
381
+ auto config = config_builder.build ();
382
+
383
+ EXPECT_THAT (config->network_proxy ->user (), username);
384
+ EXPECT_THAT (config->network_proxy ->password (), password);
385
+ EXPECT_THAT (config->network_proxy ->hostName (), hostname);
386
+ EXPECT_THAT (config->network_proxy ->port (), port);
387
+ }
370
388
371
389
namespace
372
390
{
You can’t perform that action at this time.
0 commit comments