Skip to content

Commit

Permalink
Assert branch name now that SDK includes it (#1282)
Browse files Browse the repository at this point in the history
Fixes #1251

Now that the SDK includes #1248, uncomment the integration tests that
explicitly use the SDK-provided version.

In a few cases the commented-out code was wrong, but those cases should
be obvious (e.g. NoCommit tests).
  • Loading branch information
MattKotsenas authored Oct 4, 2024
1 parent 881b367 commit a8b2777
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/SourceLink.Git.IntegrationTests/CloudHostedProvidersTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ public void NoRepository_NoWarnings()
expressions: new[]
{
"@(SourceRoot)",
// "@(SourceRoot->'%(BranchName)')", // TODO: Assert branch name once SDK has new SourceLink version https://github.com/dotnet/sourcelink/issues/1251
"@(SourceRoot->'%(BranchName)')",
"$(SourceLink)",
},
expectedResults: new[]
{
NuGetPackageFolders,
"",
// "refs/heads/main", // TODO: Assert branch name once SDK has new SourceLink version https://github.com/dotnet/sourcelink/issues/1251
"",
});

Assert.False(File.Exists(sourceLinkFilePath));
Expand Down Expand Up @@ -147,15 +147,15 @@ public void NoCommit_NoRemote_NoWarnings()
expressions: new[]
{
"@(SourceRoot)",
// "@(SourceRoot->'%(BranchName)')", // TODO: Assert branch name once SDK has new SourceLink version https://github.com/dotnet/sourcelink/issues/1251
"@(SourceRoot->'%(BranchName)')",
"$(SourceLink)",
"@(_SourceLinkFileWrites)",
},
expectedResults: new[]
{
NuGetPackageFolders,
"",
// "refs/heads/main", // TODO: Assert branch name once SDK has new SourceLink version https://github.com/dotnet/sourcelink/issues/1251
"",
"",
});
}
Expand Down Expand Up @@ -185,15 +185,15 @@ public void Commit_NoRemote_NoWarnings()
expressions: new[]
{
"@(SourceRoot)",
// "@(SourceRoot->'%(BranchName)')", // TODO: Assert branch name once SDK has new SourceLink version https://github.com/dotnet/sourcelink/issues/1251
"@(SourceRoot->'%(BranchName)')",
"$(SourceLink)",
"@(_SourceLinkFileWrites)",
},
expectedResults: new[]
{
NuGetPackageFolders,
ProjectSourceRoot,
// "refs/heads/main", // TODO: Assert branch name once SDK has new SourceLink version https://github.com/dotnet/sourcelink/issues/1251
"refs/heads/main",
"",
"",
});
Expand Down Expand Up @@ -224,15 +224,15 @@ public void NoCommit_Remote_NoWarnings()
expressions: new[]
{
"@(SourceRoot)",
// "@(SourceRoot->'%(BranchName)')", // TODO: Assert branch name once SDK has new SourceLink version https://github.com/dotnet/sourcelink/issues/1251
"@(SourceRoot->'%(BranchName)')",
"$(SourceLink)",
"@(_SourceLinkFileWrites)",
},
expectedResults: new[]
{
NuGetPackageFolders,
"",
// "refs/heads/main", // TODO: Assert branch name once SDK has new SourceLink version https://github.com/dotnet/sourcelink/issues/1251
"",
"",
});
}
Expand Down

0 comments on commit a8b2777

Please sign in to comment.