Skip to content

Commit

Permalink
Test S/R of confidential project by org manager
Browse files Browse the repository at this point in the history
  • Loading branch information
rmunn committed Jul 4, 2024
1 parent 882943b commit 3a67eea
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions backend/Testing/SyncReverseProxy/SendReceiveServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,24 @@ public void CloneBigProject(HgProtocol hgProtocol)
_sendReceiveService.RunCloneSendReceive(sendReceiveParams, AdminAuth);
}

[Theory]
[InlineData(HgProtocol.Hgweb)]
[InlineData(HgProtocol.Resumable)]
public async Task CloneConfidentialProjectAsOrgManager(HgProtocol protocol)
{
// Create a fresh project
var projectConfig = _srFixture.InitLocalFlexProjectWithRepo(protocol, isConfidential: true, LexData.SeedingData.TestOrgId);
await using var project = await RegisterProjectInLexBox(projectConfig, _adminApiTester);

// Push the project to the server
var sendReceiveParams = new SendReceiveParams(protocol, projectConfig);
_sendReceiveService.SendReceiveProject(sendReceiveParams, ManagerAuth);

// Verify pushed
var lastCommitDate = await _adminApiTester.GetProjectLastCommit(projectConfig.Code);
lastCommitDate.ShouldNotBeNullOrEmpty();
}

[Theory]
[InlineData(HgProtocol.Hgweb, "manager")]
[InlineData(HgProtocol.Resumable, "manager")]
Expand Down

0 comments on commit 3a67eea

Please sign in to comment.