Пример #1
0
        public async Task InitializeAsync()
        {
            _dockerApiUri = await DockerUtilities.DetectDockerClientApi();

            if (Build.IsTfBuild)
            {
                await DockerUtilities.KillAllOlderThan(_dockerApiUri, TimeSpan.FromMinutes(30));
            }
        }
Пример #2
0
        public async Task CanRestore()
        {
            _containerName = CreateContainerName("TheMssqlDockerContainer_CanRestore");
            await DockerUtilities.EnsureKilledAndRemoved(_dockerApiUri, _containerName);

            _container = new TestContainer(_dockerApiUri, _containerName);

            await _container.CreateAndStartAsync();

            Assert.False(_container.HealthCheck());
            Assert.True(_container.WaitUntilIsHealthy());

            await _container.Restore("Backup.bak", "RestoredDb");
        }