Exemple #1
0
        private bool SwitchToScope(EngineScopeType scope)
        {
            if (scope == EngineScopeType.Linux)
            {
                var result = _host.LinuxDaemon(_certificates);
                return(null != result && result.Success);
            }

            var res = _host.WindowsDaemon(_certificates);

            return(null != res && res.Success);
        }
        public void EnusreWindowsDaemonShallWork()
        {
            if (!OperatingSystem.IsWindows())
            {
                // Only run this test on windows devices.
                return;
            }

            try
            {
                _docker.WindowsDaemon(_certificates);
                var mode = _docker.Version(_certificates);
                Assert.AreEqual("windows", mode.Data.ServerOs);
            }
            finally
            {
                _docker.LinuxDaemon(_certificates);
            }
        }