Skip to content

Commit

Permalink
fixup! Add S/R tests using JWT over basic auth
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Oct 24, 2023
1 parent c6bc69c commit a4132a6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions backend/Testing/SyncReverseProxy/SendReceiveServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ public async Task VerifyHgWorking()
[Fact]
public void CloneBigProject()
{
RunCloneSendReceive(HgProtocol.Hgweb,
new SendReceiveAuth("admin", TestingEnvironmentVariables.DefaultPassword),
"elawa-dev-flex");
RunCloneSendReceive(HgProtocol.Hgweb, AdminAuth, "elawa-dev-flex");
}

[Theory]
Expand All @@ -97,11 +95,13 @@ public void CanCloneSendReceive(HgProtocol hgProtocol, string user)
}

[Theory]
[InlineData(HgProtocol.Hgweb)]
[InlineData(HgProtocol.Resumable)]
public async Task CanCloneSendReceiveWithJwtOverBasicAuth(HgProtocol hgProtocol)
[InlineData(HgProtocol.Hgweb, "admin")]
[InlineData(HgProtocol.Hgweb, "manager")]
[InlineData(HgProtocol.Resumable, "admin")]
[InlineData(HgProtocol.Resumable, "manager")]
public async Task CanCloneSendReceiveWithJwtOverBasicAuth(HgProtocol hgProtocol, string user)
{
var jwt = await JwtHelper.GetJwtForUser(AdminAuth);
var jwt = await JwtHelper.GetJwtForUser(new SendReceiveAuth(user, TestingEnvironmentVariables.DefaultPassword));
RunCloneSendReceive(hgProtocol,
new SendReceiveAuth(AuthKernel.JwtOverBasicAuthUsername, jwt),
TestingEnvironmentVariables.ProjectCode);
Expand Down

0 comments on commit a4132a6

Please sign in to comment.