Exemplo n.º 1
0
        public void VolumeShallNotDeletedWhenRemoveOnDisposeIsNotPresent()
        {
            string id = null;

            try
            {
                using (var vol = new Builder().UseVolume("test-volume").Build())
                {
                    vol.GetConfiguration(true); // Will throw FluentDockerException if fails
                    id = vol.Name;
                }

                var v = _docker.VolumeInspect(_certificates, id);
                Assert.IsTrue(v.Success);
                Assert.AreEqual(1, v.Data.Count);
                Assert.AreEqual(id, v.Data[0].Name);
            }
            finally
            {
                if (null != id)
                {
                    _docker.VolumeRm(_certificates, force: true, volume: id);
                }
            }
        }