コード例 #1
0
        public ISystemOperationsTests(TestFixture testFixture, ITestOutputHelper output)
        {
            _cts = CancellationTokenSource.CreateLinkedTokenSource(testFixture.cts.Token);
            _cts.Token.Register(() => throw new TimeoutException("ISystemOperationsTest timeout"));
            _cts.CancelAfter(TimeSpan.FromMinutes(5));

            _repositoryName = testFixture.repositoryName;
            _tag            = testFixture.tag;

            _client = testFixture.dockerClient;
            _output = new TestOutput(output);
        }
コード例 #2
0
        public IVolumeOperationsTests(TestFixture testFixture, ITestOutputHelper _outputHelper)
        {
            _output = new TestOutput(_outputHelper);

            _dockerConfiguration = new DockerClientConfiguration();
            _dockerClient        = _dockerConfiguration.CreateClient();

            // Do not wait forever in case it gets stuck
            _cts = new CancellationTokenSource(TimeSpan.FromMinutes(5));
            _cts.Token.Register(() => throw new TimeoutException("ImageOperationTests timeout"));

            _repositoryName = testFixture.repositoryName;
            _tag            = testFixture.tag;
        }