Skip to content

Commit 36cb303

Browse files
committed
Amend self-contained Raven test as result of Raven installer layout change
1 parent 0132fe7 commit 36cb303

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

src/ServiceControlInstaller.Engine.UnitTests/Validation/SelfContainedRavenDBTest.cs

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,36 @@ class SelfContainedRavenDBTest
1111
public void CheckForSelfContainedRavenDB()
1212
{
1313
bool isCI = Environment.GetEnvironmentVariable("CI") == "true";
14-
bool isLocal = !isCI;
1514

1615
var ravenServerPath = Path.GetFullPath(Path.Combine(TestContext.CurrentContext.TestDirectory, "..", "..", "..", "..", "..", "deploy", "RavenDBServer"));
1716
var ravenStudio = Path.Combine(ravenServerPath, "Raven.Studio.zip");
1817
var ravenServerDll = Path.Combine(ravenServerPath, "Raven.Server.dll");
1918
var ravenServerExe = Path.Combine(ravenServerPath, "Raven.Server.exe");
2019
var offlineOperationsUtility = Path.Combine(ravenServerPath, "rvn.exe");
2120

22-
Assert.Multiple(() =>
21+
try
2322
{
24-
Assert.That(ravenStudio, Does.Exist); // No matter what
25-
Assert.That(File.Exists(ravenServerDll), Is.EqualTo(isLocal)); // Only in local development
26-
Assert.That(File.Exists(ravenServerExe), Is.EqualTo(isCI)); // Only on CI
27-
Assert.That(File.Exists(offlineOperationsUtility), Is.EqualTo(isCI)); // Only on CI
28-
});
23+
Assert.Multiple(() =>
24+
{
25+
Assert.That(ravenStudio, Does.Exist); // As of 6.2.3 this exists in embedded & self-contained versions
26+
Assert.That(ravenServerDll, Does.Exist); // As of 6.2.3 this exists in embedded & self-contained versions
27+
if (isCI)
28+
{
29+
// These may not exist on a local build and that's OK, but they must exist in a self-contained build
30+
Assert.That(ravenServerExe, Does.Exist);
31+
Assert.That(offlineOperationsUtility, Does.Exist);
32+
}
33+
});
34+
}
35+
catch (Exception)
36+
{
37+
TestContext.Out.WriteLine($"Contents of RavenServerPath {ravenServerPath}:");
38+
foreach (var name in Directory.GetFileSystemEntries(ravenServerPath))
39+
{
40+
TestContext.Out.WriteLine($" * {name}");
41+
}
42+
throw;
43+
}
2944
}
3045
}
3146
}

tools/download-ravendb-server.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,6 @@ Copy-Item -Path $serverPath -Destination $deployPath -Recurse
5151
Write-Output "Deleting temporary files"
5252
Remove-Item $zipPath -Force
5353
Remove-Item $unzipPath -Force -Recurse
54+
55+
Write-Output "Contents of deploy/RavenDBServer"
56+
Get-ChildItem deploy/RavenDBServer

0 commit comments

Comments
 (0)