コード例 #1
0
ファイル: EngineScope.cs プロジェクト: zplzk2/FluentDocker
        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);
        }
コード例 #2
0
        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);
            }
        }