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 25, 2023
1 parent 8d99329 commit e75739c
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 e75739c

Please sign in to comment.