Skip to content

Commit 5c87b3d

Browse files
meili-bors[bot]kashifsoofidependabot[bot]
authored
Merge #490 #504
490: Add Total tasks in task route r=brunoocasali a=kashifsoofi # Pull Request ## Related issue Fixes #462 ## What does this PR do? - Added Total Tasks in task route ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! 504: Bump xunit.runner.visualstudio from 2.5.3 to 2.5.4 r=brunoocasali a=dependabot[bot] Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.5.3 to 2.5.4. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/xunit/visualstudio.xunit/commit/b9eacec401591bf17d5a3a5436223045c980562e"><code>b9eacec</code></a> v2.5.4</li> <li><a href="https://github.com/xunit/visualstudio.xunit/commit/316c225a721e952c98ee36fbd722c2859ff3847e"><code>316c225</code></a> Latest dependencies</li> <li><a href="https://github.com/xunit/visualstudio.xunit/commit/9d3aaa076f1c5596dd5aed68941aef6ca9657c55"><code>9d3aaa0</code></a> Latest dependencies</li> <li><a href="https://github.com/xunit/visualstudio.xunit/commit/da1033b99db9ae1debee355466a031081540dd78"><code>da1033b</code></a> Latest dependencies</li> <li><a href="https://github.com/xunit/visualstudio.xunit/commit/8b760896810eb16a3a55c30a3ee63739ff84a1eb"><code>8b76089</code></a> Remove unnecessary global.json</li> <li><a href="https://github.com/xunit/visualstudio.xunit/commit/af8f8dfd4ffc32c25a81c2dd3e427658f4c63696"><code>af8f8df</code></a> Sort Directory.Build.props</li> <li><a href="https://github.com/xunit/visualstudio.xunit/commit/44114d063aae1b4c40d7dd64e378d4151f17f949"><code>44114d0</code></a> Disable MSBuild transitive copies</li> <li><a href="https://github.com/xunit/visualstudio.xunit/commit/48b0558eadbee6b79379b2ad988ab5940882ef27"><code>48b0558</code></a> Latest dependencies</li> <li><a href="https://github.com/xunit/visualstudio.xunit/commit/2b7d93036611a5026efe1b5cb90df7290a396f0b"><code>2b7d930</code></a> Updated README</li> <li><a href="https://github.com/xunit/visualstudio.xunit/commit/097b60584fb932d3dcff297de827c543c879c7f4"><code>097b605</code></a> Move load failure messages from DiaSession and friends to internal diagnostic...</li> <li>Additional commits viewable in <a href="https://github.com/xunit/visualstudio.xunit/compare/2.5.3...2.5.4">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=xunit.runner.visualstudio&package-manager=nuget&previous-version=2.5.3&new-version=2.5.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: Kashif Soofi <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 parents ffe0303 + 08c6d5f + 6bc3c79 commit 5c87b3d

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/Meilisearch/TasksResults.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ namespace Meilisearch
99
/// <typeparam name="T">Type of the Meilisearch server object. Ex: keys, indexes, ...</typeparam>
1010
public class TasksResults<T> : Result<T>
1111
{
12-
public TasksResults(T results, int? limit, int? from, int? next)
12+
public TasksResults(T results, int? limit, int? from, int? next, int? total)
1313
: base(results, limit)
1414
{
1515
From = from;
1616
Next = next;
17+
Total = total;
1718
}
1819

1920
/// <summary>
@@ -25,5 +26,10 @@ public TasksResults(T results, int? limit, int? from, int? next)
2526
/// Gets next size.
2627
/// </summary>
2728
public int? Next { get; }
29+
30+
/// <summary>
31+
/// Gets total number of tasks.
32+
/// </summary>
33+
public int? Total { get; }
2834
}
2935
}

tests/Meilisearch.Tests/Meilisearch.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageReference Include="FluentAssertions" Version="6.12.0" />
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
1212
<PackageReference Include="xunit" Version="2.5.1" />
13-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
13+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

tests/Meilisearch.Tests/TaskInfoTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public async Task GetMultipleTaskInfoWithQueryParameters()
6868
var taskResponse = await _index.GetTasksAsync(new TasksQuery { Limit = 1, IndexUids = new List<string> { _index.Uid } });
6969

7070
taskResponse.Results.Count().Should().BeGreaterOrEqualTo(1);
71+
taskResponse.Total.Should().BeGreaterThan(0);
7172
}
7273

7374
[Fact]

0 commit comments

Comments
 (0)