Skip to content

Commit

Permalink
TS-31191 readd net6 test
Browse files Browse the repository at this point in the history
  • Loading branch information
jveihelmann committed Nov 22, 2023
1 parent 522af44 commit 77cea49
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions UploadDaemon_Test/UploadDaemonSystemTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,42 @@ public void TestArchivePurging()
Assert.That(archivedFiles, Is.Empty);
}

[Test]
public void TestNet6EmbeddedAssembly()
{
string coverageFileName = "coverage_1_1.txt";
string targetAssembly = Path.Combine(TestProgramRoot, "Net6ConsoleApp.dll");
File.WriteAllText(Path.Combine(TargetDir, coverageFileName), $@"Assembly=ProfilerTestee:2 Version:1.0.0.0 Path:{targetAssembly}
Process={targetAssembly}
Inlined=2:100663298");
TeamscaleMockServer mockServer = new TeamscaleMockServer(1337);
mockServer.SetResponse(200);
new UploadDaemon().RunOnce(Config.Read($@"
match:
- profiler:
targetdir: {TargetDir}
uploader:
directory: {UploadDir}
pdbDirectory: {PdbDirectory}\ProfilerTestee
teamscale:
url: http://localhost:1337
username: admin
accessKey: fookey
partition: my_partition
"));

List<string> requests = mockServer.GetRecievedRequests();
mockServer.StopServer();
Assert.Multiple(() =>
{
StringAssert.Contains("/p/TestProject/", requests[0]);
StringAssert.Contains("revision=master%3aHEAD", requests[0]);
Assert.That(File.Exists(Path.Combine(TargetDir, coverageFileName)), Is.False, "File is in upload folder.");
Assert.That(File.Exists(Path.Combine(TargetDir, "uploaded", coverageFileName)), Is.True, "File was properly archived.");
});
}

[Test]
public void TestEmbeddedLibrarySetup()
{
Expand Down
Binary file modified test-data/test-programs/Net6ConsoleApp.dll
Binary file not shown.

0 comments on commit 77cea49

Please sign in to comment.