public void RepairFixesCorruptBlobSizesDatabase() { GSDFunctionalTestEnlistment enlistment = this.CloneAndMountEnlistment(); enlistment.UnmountGSD(); // Repair on a healthy enlistment should succeed enlistment.Repair(confirm: true); string blobSizesRoot = GSDHelpers.GetPersistedBlobSizesRoot(enlistment.DotGSDRoot).ShouldNotBeNull(); string blobSizesDbPath = Path.Combine(blobSizesRoot, "BlobSizes.sql"); blobSizesDbPath.ShouldBeAFile(this.fileSystem); this.fileSystem.WriteAllText(blobSizesDbPath, "0000"); enlistment.TryMountGSD().ShouldEqual(false, "GSD shouldn't mount when blob size db is corrupt"); enlistment.Repair(confirm: true); enlistment.MountGSD(); }