Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c07d3e9
pr-fix: correct merge w/ 'main'
stijnmoreels Aug 2, 2024
6b26d6d
Merge branch 'main' of https://github.com/stijnmoreels/arcus.testing
stijnmoreels Aug 2, 2024
0de9e56
Merge remote-tracking branch 'upstream/main'
stijnmoreels Aug 26, 2024
cbfd3d9
Merge remote-tracking branch 'upstream/main'
stijnmoreels Sep 6, 2024
cc62c4b
Merge remote-tracking branch 'upstream/main'
stijnmoreels Sep 13, 2024
7ad43ef
Merge remote-tracking branch 'upstream/main'
stijnmoreels Sep 23, 2024
483f449
Merge remote-tracking branch 'upstream/main'
stijnmoreels Sep 27, 2024
b496a00
Merge remote-tracking branch 'upstream/main'
stijnmoreels Oct 10, 2024
be1dc25
Merge remote-tracking branch 'upstream/main'
stijnmoreels Oct 18, 2024
6968cb5
Merge remote-tracking branch 'upstream/main'
stijnmoreels Oct 18, 2024
b0b1e6d
Merge remote-tracking branch 'upstream/main'
stijnmoreels Oct 18, 2024
6080add
Merge remote-tracking branch 'upstream/main'
stijnmoreels Oct 23, 2024
42cdd3d
Merge remote-tracking branch 'upstream/main'
stijnmoreels Oct 28, 2024
3c67e9a
Merge remote-tracking branch 'upstream/main'
stijnmoreels Oct 28, 2024
c25ca9c
Merge remote-tracking branch 'upstream/main'
stijnmoreels Oct 29, 2024
b94ed50
chore: eat your own logging dog food
stijnmoreels Nov 1, 2024
23de681
fix: safeguard nosql container disposal against invalid use
stijnmoreels Nov 1, 2024
b054ae3
pr-fix: specify assertion
stijnmoreels Nov 1, 2024
ec6ff58
pr-fix: revert prev changes
stijnmoreels Nov 1, 2024
7b267b2
pr-fix: redo changes
stijnmoreels Nov 1, 2024
a4acf1b
Delete src/Arcus.Testing.Tests.Integration/Arcus - Backup.Testing.Tes…
stijnmoreels Nov 1, 2024
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
10 changes: 5 additions & 5 deletions src/Arcus.Testing.Storage.Cosmos/TemporaryNoSqlContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static NoSqlItemFilter PartitionKeyEqual(PartitionKey partitionKey)
/// <summary>
/// Creates a filter to match a NoSql item based on its contents.
/// </summary>
/// <typeparam name="TItem">The custom custom type </typeparam>
/// <typeparam name="TItem">The custom type </typeparam>
/// <param name="itemFilter">The custom filter to match against the contents of the NoSql item.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="itemFilter"/> is <c>null</c>.</exception>
/// <exception cref="InvalidOperationException">Thrown when the used client has no serializer configured.</exception>
Expand Down Expand Up @@ -202,8 +202,8 @@ public class OnTeardownNoSqlContainerOptions
internal OnTeardownNoSqlContainer Items { get; private set; }

/// <summary>
/// (default for cleaning documents) Configures the <see cref="TemporaryNoSqlContainer"/> to only delete the NoSql items upon disposal
/// if the document was inserted by the test fixture (using <see cref="TemporaryNoSqlContainer.AddItemAsync{TItem}"/>).
/// (default for cleaning items) Configures the <see cref="TemporaryNoSqlContainer"/> to only delete the NoSql items upon disposal
/// if the item was inserted by the test fixture (using <see cref="TemporaryNoSqlContainer.AddItemAsync{TItem}"/>).
/// </summary>
public OnTeardownNoSqlContainerOptions CleanCreatedItems()
{
Expand All @@ -225,7 +225,7 @@ public OnTeardownNoSqlContainerOptions CleanAllItems()
/// upon disposal that match any of the configured <paramref name="filters"/>.
/// </summary>
/// <remarks>
/// The matching of documents only happens on NoSql items that were created outside the scope of the test fixture.
/// The matching of items only happens on NoSql items that were created outside the scope of the test fixture.
/// All items created by the test fixture will be deleted upon disposal, regardless of the filters.
/// This follows the 'clean environment' principle where the test fixture should clean up after itself and not linger around any state it created.
/// </remarks>
Expand Down Expand Up @@ -572,7 +572,7 @@ public async ValueTask DisposeAsync()
disposables.Add(AsyncDisposable.Create(async () =>
{
_logger.LogDebug("[Test:Teardown] Delete Azure Cosmos NoSql '{ContainerName}' container in database '{DatabaseName}'", _container.Id.Name, _container.Id.Parent?.Name);
await _container.DeleteAsync(WaitUntil.Started);
await _container.DeleteAsync(WaitUntil.Completed);
}));
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<ProjectReference Include="..\Arcus.Testing.Assert\Arcus.Testing.Assert.csproj" />
<ProjectReference Include="..\Arcus.Testing.Core\Arcus.Testing.Core.csproj" />
<ProjectReference Include="..\Arcus.Testing.Integration.DataFactory\Arcus.Testing.Integration.DataFactory.csproj" />
<ProjectReference Include="..\Arcus.Testing.Logging.Xunit\Arcus.Testing.Logging.Xunit.csproj" />
<ProjectReference Include="..\Arcus.Testing.Storage.Blob\Arcus.Testing.Storage.Blob.csproj" />
<ProjectReference Include="..\Arcus.Testing.Storage.Cosmos\Arcus.Testing.Storage.Cosmos.csproj" />
<ProjectReference Include="..\Arcus.Testing.Storage.Table\Arcus.Testing.Storage.Table.csproj" />
Expand Down
3 changes: 1 addition & 2 deletions src/Arcus.Testing.Tests.Integration/IntegrationTest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Arcus.Template.Tests.Integration.Logging;
using Arcus.Testing.Tests.Integration.Configuration;
using Arcus.Testing.Tests.Integration.Configuration;
using Bogus;
using Microsoft.Extensions.Logging;
using Xunit.Abstractions;
Expand Down
35 changes: 0 additions & 35 deletions src/Arcus.Testing.Tests.Integration/Logging/XunitTestLogger.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,9 @@ public async Task ShouldStoreContainerAsync(string containerId)
/// </summary>
public async Task ShouldNotStoreContainerAsync(string containerId)
{
await Poll.UntilAvailableAsync<XunitException>(async () =>
{
Container cont = Database.GetContainer(containerId);
var exception = await Assert.ThrowsAnyAsync<CosmosException>(() => cont.ReadContainerAsync());
Assert.Equal(HttpStatusCode.NotFound, exception.StatusCode);
});
Container cont = Database.GetContainer(containerId);
var exception = await Assert.ThrowsAnyAsync<CosmosException>(() => cont.ReadContainerAsync());
Assert.Equal(HttpStatusCode.NotFound, exception.StatusCode);
}

/// <summary>
Expand Down
Loading