Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix S/R tests with Mercurial 6 #716

Merged
merged 9 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
if: ${{ inputs.runs-on == 'self-hosted' }}
run: |
sudo apt-get update
sudo apt-get install -y p7zip-full wget zlib1g-dev libssl-dev #needed by setup python
sudo apt-get install -y p7zip-full iputils-ping python3-venv wget zlib1g-dev libssl-dev #needed by setup python
wget -q https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell_7.4.1-1.deb_amd64.deb
sudo dpkg -i powershell_7.4.1-1.deb_amd64.deb
sudo apt-get install -f
Expand Down
2 changes: 1 addition & 1 deletion backend/Testing/LexCore/Services/HgServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public async Task CanFinishResetByUnZippingAnArchive(string filePath)
[InlineData("-xy")]
[InlineData("-x-y-z")]
[InlineData("-123")]
private async void ProjectCodesMayNotStartWithHyphen(string code)
private async Task ProjectCodesMayNotStartWithHyphen(string code)
{
await Assert.ThrowsAsync<ArgumentException>(() => _hgService.InitRepo(code));
}
Expand Down
4 changes: 2 additions & 2 deletions backend/Testing/SyncReverseProxy/SendReceiveServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
}
""";
var jsonResult = await apiTester.ExecuteGql(gqlQuery);
var lastCommitDate = jsonResult["data"]["projectByCode"]["lastCommit"].ToString();

Check warning on line 160 in backend/Testing/SyncReverseProxy/SendReceiveServiceTests.cs

View workflow job for this annotation

GitHub Actions / Test self-hosted for Mercurial 6 on develop

Dereference of a possibly null reference.

Check warning on line 160 in backend/Testing/SyncReverseProxy/SendReceiveServiceTests.cs

View workflow job for this annotation

GitHub Actions / Test self-hosted for Mercurial 6 on develop

Dereference of a possibly null reference.

Check warning on line 160 in backend/Testing/SyncReverseProxy/SendReceiveServiceTests.cs

View workflow job for this annotation

GitHub Actions / Test self-hosted for Mercurial 6 on develop

Dereference of a possibly null reference.

Check warning on line 160 in backend/Testing/SyncReverseProxy/SendReceiveServiceTests.cs

View workflow job for this annotation

GitHub Actions / Test self-hosted for Mercurial 6 on develop

Dereference of a possibly null reference.

Check warning on line 160 in backend/Testing/SyncReverseProxy/SendReceiveServiceTests.cs

View workflow job for this annotation

GitHub Actions / Test self-hosted for Mercurial 6 on develop

Dereference of a possibly null reference.

// Clone
var sendReceiveParams = GetParams(protocol, projectCode);
Expand All @@ -175,7 +175,7 @@
await Task.Delay(6000);

jsonResult = await apiTester.ExecuteGql(gqlQuery);
var lastCommitDateAfter = jsonResult["data"]["projectByCode"]["lastCommit"].ToString();

Check warning on line 178 in backend/Testing/SyncReverseProxy/SendReceiveServiceTests.cs

View workflow job for this annotation

GitHub Actions / Test self-hosted for Mercurial 6 on develop

Dereference of a possibly null reference.

Check warning on line 178 in backend/Testing/SyncReverseProxy/SendReceiveServiceTests.cs

View workflow job for this annotation

GitHub Actions / Test self-hosted for Mercurial 6 on develop

Dereference of a possibly null reference.

Check warning on line 178 in backend/Testing/SyncReverseProxy/SendReceiveServiceTests.cs

View workflow job for this annotation

GitHub Actions / Test self-hosted for Mercurial 6 on develop

Dereference of a possibly null reference.
lastCommitDateAfter.ShouldBeGreaterThan(lastCommitDate);
}

Expand Down Expand Up @@ -235,8 +235,8 @@
UserName = auth.Username,
Password = auth.Password
};
HgRunner.Run($"hg clone {hgwebUrl}{origProjectCode} {sourceProjectDir}", "", 15, progress);
HgRunner.Run($"hg push {hgwebUrl}{newProjectCode}", sourceProjectDir, 15, progress);
HgRunner.Run($"hg clone {hgwebUrl}{origProjectCode} {sourceProjectDir}", "", 45, progress);
HgRunner.Run($"hg push {hgwebUrl}{newProjectCode}", sourceProjectDir, 45, progress);

// Sleep 5 seconds to ensure hgweb picks up newly-pushed commits
await Task.Delay(TimeSpan.FromSeconds(5));
Expand Down
4 changes: 2 additions & 2 deletions backend/Testing/Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<Choose>
<When Condition=" '$(MercurialVersion)' == '6' ">
<ItemGroup>
<PackageReference Include="SIL.Chorus.LibChorus" Version="6.0.0-beta0043" />
<PackageReference Include="SIL.Chorus.Mercurial" Version="6.5.1.22" />
<PackageReference Include="SIL.Chorus.LibChorus" Version="6.0.0-beta0044" />
<PackageReference Include="SIL.Chorus.Mercurial" Version="6.5.1.25" />
</ItemGroup>
</When>
<Otherwise>
Expand Down
Loading