-
Notifications
You must be signed in to change notification settings - Fork 43
tests(mongo-db): move integration to direct sink generation #138
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
Merged
mo-esmp
merged 13 commits into
serilog-contrib:master
from
followynne:tests/move-mongodb-to-sink-generation
Aug 26, 2024
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
afce1b3
feat(exception): add option to render in provider as string
followynne 896e020
feat(ui): implement new exception management
followynne 901c901
tests(ui): useException, review implementation
followynne b092e75
tests: new BE option
followynne 0ba63f0
bump versions
followynne 3ddec08
tests(mongodb): use real sink to generate logs
followynne d2c2378
feat(log-model): new Id property, map for mssql, mysql, mongo and raven
followynne 50e6fff
feat(elastic): map Id onto hits id
followynne 340ca4f
bump packages
followynne 77eeb86
bump nugets
followynne 77fb688
Merge branch 'master' into tests/move-mongodb-to-sink-generation
followynne 3c1a9e1
Revert "feat(log-model): new Id property, map for mssql, mysql, mongo…
followynne c5f0b0f
Revert "feat(elastic): map Id onto hits id"
followynne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,15 +24,15 @@ | |
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'"> | ||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.32"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please change to |
||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.33"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'"> | ||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.20"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'"> | ||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7"/> | ||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.8"/> | ||
</ItemGroup> | ||
|
||
<!-- Serilog UI packages --> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -795,7 +795,7 @@ | |
"@octokit/types" "^13.1.0" | ||
universal-user-agent "^6.0.0" | ||
|
||
"@octokit/rest@^20.0.2": | ||
"@octokit/rest@^20.1.1": | ||
version "20.1.1" | ||
resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-20.1.1.tgz#ec775864f53fb42037a954b9a40d4f5275b3dc95" | ||
integrity sha512-MB4AYDsM5jhIHro/dq4ix1iWTLGToIGk6cWF5L6vanFaMble5jTX/UBQyiv05HsWnwUtY8JrfHy2LWfKwihqMw== | ||
|
@@ -845,10 +845,10 @@ | |
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.25.tgz#f077fdc0b5d0078d30893396ff4827a13f99e817" | ||
integrity sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ== | ||
|
||
"@remix-run/[email protected].0": | ||
version "1.19.0" | ||
resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.19.0.tgz#745dbffbce67f05386d57ca22c51dfd85c979593" | ||
integrity sha512-zDICCLKEwbVYTS6TjYaWtHXxkdoUvD/QXvyVZjGCsWz5vyH7aFeONlPffPdW+Y/t6KT0MgXb2Mfjun9YpWN1dA== | ||
"@remix-run/[email protected].1": | ||
version "1.19.1" | ||
resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.19.1.tgz#984771bfd1de2715f42394c87fb716c1349e014f" | ||
integrity sha512-S45oynt/WH19bHbIXjtli6QmwNYvaz+vtnubvNpNDvUOoA/OWh6j1OikIP3G+v5GHdxyC6EXoChG3HgYGEUfcg== | ||
|
||
"@rollup/[email protected]": | ||
version "4.18.0" | ||
|
@@ -930,10 +930,10 @@ | |
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz#5d694d345ce36b6ecf657349e03eb87297e68da4" | ||
integrity sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g== | ||
|
||
"@shikijs/core@1.12.1": | ||
version "1.12.1" | ||
resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.12.1.tgz#32626494bef573cce01f9e0a36d5776cbc1b2e58" | ||
integrity sha512-biCz/mnkMktImI6hMfMX3H9kOeqsInxWEyCHbSlL8C/2TR1FqfmGxTLRNwYCKsyCyxWLbB8rEqXRVZuyxuLFmA== | ||
"@shikijs/core@1.13.0": | ||
version "1.13.0" | ||
resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.13.0.tgz#ffbdf8d27ce5783d97b979659194367e06b63af7" | ||
integrity sha512-Mj5NVfbAXcD1GnwOTSPl8hBn/T8UDpfFQTptp+p41n/CbUcJtOq98WaRD7Lz3hCglYotUTHUWtzu3JhK6XlkAA== | ||
dependencies: | ||
"@types/hast" "^3.0.4" | ||
|
||
|
@@ -1128,12 +1128,12 @@ | |
dependencies: | ||
undici-types "~5.26.4" | ||
|
||
"@types/node@^22.3.0": | ||
version "22.3.0" | ||
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.3.0.tgz#7f8da0e2b72c27c4f9bd3cb5ef805209d04d4f9e" | ||
integrity sha512-nrWpWVaDZuaVc5X84xJ0vNrLvomM205oQyLsRt7OHNZbSHslcWsvgFR7O7hire2ZonjLrWBbedmotmIlJDVd6g== | ||
"@types/node@^22.4.0": | ||
version "22.4.0" | ||
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.4.0.tgz#c295fe1d6f5f58916cc61dbef8cf65b5b9b71de9" | ||
integrity sha512-49AbMDwYUz7EXxKU/r7mXOsxwFr4BYbvB7tWYxVuLdb2ibd30ijjXINSMAHiEEZk5PCRBmW1gUeisn2VMKt3cQ== | ||
dependencies: | ||
undici-types "~6.18.2" | ||
undici-types "~6.19.2" | ||
|
||
"@types/prop-types@*": | ||
version "15.7.12" | ||
|
@@ -1670,7 +1670,7 @@ axe-core@^4.9.1: | |
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.0.tgz#d9e56ab0147278272739a000880196cdfe113b59" | ||
integrity sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g== | ||
|
||
axios@^1.6.8: | ||
axios@^1.7.4: | ||
version "1.7.4" | ||
resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.4.tgz#4c8ded1b43683c8dd362973c393f3ede24052aa2" | ||
integrity sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw== | ||
|
@@ -1970,7 +1970,7 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: | |
dependencies: | ||
ms "2.1.2" | ||
|
||
debug@^4.3.5: | ||
debug@^4.3.5, debug@^4.3.6: | ||
version "4.3.6" | ||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" | ||
integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== | ||
|
@@ -3855,7 +3855,7 @@ postcss@^8.4.38: | |
picocolors "^1.0.0" | ||
source-map-js "^1.2.0" | ||
|
||
postcss@^8.4.40, postcss@^8.4.41: | ||
postcss@^8.4.41: | ||
version "8.4.41" | ||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.41.tgz#d6104d3ba272d882fe18fc07d15dc2da62fa2681" | ||
integrity sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ== | ||
|
@@ -3978,20 +3978,20 @@ react-remove-scroll@^2.5.7: | |
use-callback-ref "^1.3.0" | ||
use-sidecar "^1.1.2" | ||
|
||
react-router-dom@^6.26.0: | ||
version "6.26.0" | ||
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.26.0.tgz#8debe13295c58605c04f93018d659a763245e58c" | ||
integrity sha512-RRGUIiDtLrkX3uYcFiCIxKFWMcWQGMojpYZfcstc63A1+sSnVgILGIm9gNUA6na3Fm1QuPGSBQH2EMbAZOnMsQ== | ||
react-router-dom@^6.26.1: | ||
version "6.26.1" | ||
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.26.1.tgz#a408892b41767a49dc94b3564b0e7d8e3959f623" | ||
integrity sha512-veut7m41S1fLql4pLhxeSW3jlqs+4MtjRLj0xvuCEXsxusJCbs6I8yn9BxzzDX2XDgafrccY6hwjmd/bL54tFw== | ||
dependencies: | ||
"@remix-run/router" "1.19.0" | ||
react-router "6.26.0" | ||
"@remix-run/router" "1.19.1" | ||
react-router "6.26.1" | ||
|
||
[email protected].0: | ||
version "6.26.0" | ||
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.26.0.tgz#d5af4c46835b202348ef2b7ddacd32a2db539fde" | ||
integrity sha512-wVQq0/iFYd3iZ9H2l3N3k4PL8EEHcb0XlU2Na8nEwmiXgIUElEH6gaJDtUQxJ+JFzmIXaQjfdpcGWaM6IoQGxg== | ||
[email protected].1: | ||
version "6.26.1" | ||
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.26.1.tgz#88c64837e05ffab6899a49df2a1484a22471e4ce" | ||
integrity sha512-kIwJveZNwp7teQRI5QmwWo39A5bXRyqpH0COKKmPnyD2vBvDwgFXSqDUYtt1h+FEyfnE8eXr7oe0MxRzVwCcvQ== | ||
dependencies: | ||
"@remix-run/router" "1.19.0" | ||
"@remix-run/router" "1.19.1" | ||
|
||
react-style-singleton@^2.2.1: | ||
version "2.2.1" | ||
|
@@ -4218,12 +4218,12 @@ shebang-regex@^3.0.0: | |
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" | ||
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== | ||
|
||
shiki@^1.12.1: | ||
version "1.12.1" | ||
resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.12.1.tgz#72d9d230a8d68ddaf8cf7c94a1dc6a5f2625324e" | ||
integrity sha512-nwmjbHKnOYYAe1aaQyEBHvQymJgfm86ZSS7fT8OaPRr4sbAcBNz7PbfAikMEFSDQ6se2j2zobkXvVKcBOm0ysg== | ||
shiki@^1.13.0: | ||
version "1.13.0" | ||
resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.13.0.tgz#129986ad475ad4a962b5c681eabb843e38dde65e" | ||
integrity sha512-e0dWfnONbEv6xl7FJy3XIhsVHQ/65XHDZl92+6H9+4xWjfdo7pmkqG7Kg47KWtDiEtzM5Z+oEfb4vtRvoZ/X9w== | ||
dependencies: | ||
"@shikijs/core" "1.12.1" | ||
"@shikijs/core" "1.13.0" | ||
"@types/hast" "^3.0.4" | ||
|
||
side-channel@^1.0.4, side-channel@^1.0.6: | ||
|
@@ -4664,10 +4664,10 @@ undici-types@~5.26.4: | |
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" | ||
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== | ||
|
||
undici-types@~6.18.2: | ||
version "6.18.2" | ||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.18.2.tgz#8b678cf939d4fc9ec56be3c68ed69c619dee28b0" | ||
integrity sha512-5ruQbENj95yDYJNS3TvcaxPMshV7aizdv/hWYjGIKoANWKjhWNBsr2YEuYZKodQulB1b8l7ILOuDQep3afowQQ== | ||
undici-types@~6.19.2: | ||
version "6.19.6" | ||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.6.tgz#e218c3df0987f4c0e0008ca00d6b6472d9b89b36" | ||
integrity sha512-e/vggGopEfTKSvj4ihnOLTsqhrKRN3LeO6qSN/GxohhuRv8qH9bNQ4B8W7e/vFL+0XTnmHPB4/kegunZGA4Org== | ||
|
||
universal-user-agent@^6.0.0: | ||
version "6.0.1" | ||
|
@@ -4775,15 +4775,15 @@ vite-plugin-checker@^0.7.2: | |
vscode-languageserver-textdocument "^1.0.1" | ||
vscode-uri "^3.0.2" | ||
|
||
vite-plugin-mkcert@^1.17.5: | ||
version "1.17.5" | ||
resolved "https://registry.yarnpkg.com/vite-plugin-mkcert/-/vite-plugin-mkcert-1.17.5.tgz#175f1a2a99c110fa87b2f2e6390b22656674a67b" | ||
integrity sha512-KKGY3iHx/9zb7ow8JJ+nLN2HiNIBuPBwj34fJ+jAJT89/8qfk7msO7G7qipR8VDEm9xMCys0xT11QOJbZcg3/Q== | ||
vite-plugin-mkcert@^1.17.6: | ||
version "1.17.6" | ||
resolved "https://registry.yarnpkg.com/vite-plugin-mkcert/-/vite-plugin-mkcert-1.17.6.tgz#c514d3d72ba201997e29cc537538bf8ff126c5c2" | ||
integrity sha512-4JR1RN0HEg/w17eRQJ/Ve2pSa6KCVQcQO6yKtIaKQCFDyd63zGfXHWpygBkvvRSpqa0GcqNKf0fjUJ0HiJQXVQ== | ||
dependencies: | ||
"@octokit/rest" "^20.0.2" | ||
axios "^1.6.8" | ||
debug "^4.3.4" | ||
picocolors "^1.0.0" | ||
"@octokit/rest" "^20.1.1" | ||
axios "^1.7.4" | ||
debug "^4.3.6" | ||
picocolors "^1.0.1" | ||
|
||
vite-tsconfig-paths@^5.0.1: | ||
version "5.0.1" | ||
|
@@ -4805,13 +4805,13 @@ vite@^5.0.0: | |
optionalDependencies: | ||
fsevents "~2.3.3" | ||
|
||
vite@^5.4.0: | ||
version "5.4.0" | ||
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.0.tgz#11dca8a961369ba8b5cae42d068c7ad684d5370f" | ||
integrity sha512-5xokfMX0PIiwCMCMb9ZJcMyh5wbBun0zUzKib+L65vAZ8GY9ePZMXxFrHbr/Kyll2+LSCY7xtERPpxkBDKngwg== | ||
vite@^5.4.1: | ||
version "5.4.1" | ||
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.1.tgz#2aa72370de824d23f53658affd807e4c9905b058" | ||
integrity sha512-1oE6yuNXssjrZdblI9AfBbHCC41nnyoVoEZxQnID6yvQZAFBzxxkqoFLtHUMkYunL8hwOLEjgTuxpkRxvba3kA== | ||
dependencies: | ||
esbuild "^0.21.3" | ||
postcss "^8.4.40" | ||
postcss "^8.4.41" | ||
rollup "^4.13.0" | ||
optionalDependencies: | ||
fsevents "~2.3.3" | ||
|
39 changes: 0 additions & 39 deletions
39
tests/Serilog.Ui.Common.Tests/DataSamples/MongoDbLogModelFaker.cs
This file was deleted.
Oops, something went wrong.
36 changes: 2 additions & 34 deletions
36
tests/Serilog.Ui.MongoDbProvider.Tests/DataProvider/DataProviderSearchTest.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,11 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using FluentAssertions; | ||
using Microsoft.Extensions.Primitives; | ||
using MongoDb.Tests.Util; | ||
using MongoDb.Tests.Util; | ||
using Serilog.Ui.Common.Tests.TestSuites.Impl; | ||
using Serilog.Ui.Core.Models; | ||
using Serilog.Ui.MongoDbProvider; | ||
using Xunit; | ||
|
||
namespace MongoDb.Tests.DataProvider | ||
{ | ||
[Collection(nameof(MongoDbDataProvider))] | ||
[Trait("Integration-Search", "MongoDb")] | ||
public class DataProviderSearchTest(BaseIntegrationTest instance) : IntegrationSearchTests<BaseIntegrationTest>(instance) | ||
{ | ||
public override async Task It_finds_only_data_emitted_in_dates_range() | ||
{ | ||
var firstTimeStamp = LogCollector.TimesSamples.First().AddSeconds(50); | ||
var lastTimeStamp = LogCollector.TimesSamples.Last().AddSeconds(50); | ||
var inTimeStampCount = LogCollector.DataSet | ||
.Count(p => p.Timestamp >= firstTimeStamp && p.Timestamp < lastTimeStamp); | ||
var query = new Dictionary<string, StringValues> | ||
{ | ||
["page"] = "1", | ||
["count"] = "1000", | ||
["startDate"] = firstTimeStamp.ToString("O"), | ||
["endDate"] = lastTimeStamp.ToString("O") | ||
}; | ||
|
||
var (logs, count) = await Provider.FetchDataAsync(FetchLogsQuery.ParseQuery(query)); | ||
|
||
var enumerateLogs = logs.ToList(); | ||
enumerateLogs.Should().NotBeEmpty(); | ||
enumerateLogs.Should().HaveCount(inTimeStampCount); | ||
count.Should().Be(inTimeStampCount); | ||
enumerateLogs.Should().OnlyContain(p => | ||
p.Timestamp.ToUniversalTime() >= firstTimeStamp && | ||
p.Timestamp.ToUniversalTime() < lastTimeStamp); | ||
} | ||
} | ||
public class DataProviderSearchTest(BaseIntegrationTest instance) : IntegrationSearchTests<BaseIntegrationTest>(instance); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to
8.0.*
.