Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ public async Task LocalStack_Should_Handle_Empty_EagerLoadedServices_Like_Lazy_L
await Assert.That(servicesNode).IsNotNull();

// Services should not be running by default (lazy loading)
if (servicesNode.ContainsKey("sqs"))
var sqsService = servicesNode["sqs"];
if (sqsService is not null)
{
await Assert.That(servicesNode["sqs"]?.ToString()).IsNotEqualTo("running");
await Assert.That(sqsService.ToString()).IsNotEqualTo("running");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@ public async Task WithReference_Should_Return_Builder_When_LocalStack_Is_Null()
{
const string testProjectResourceName = "test-project";

IResourceBuilder<ProjectResource>? resultBuilder = null;
IResourceBuilder<ProjectResource>? originalBuilder = null;

var (app, projectResource) = TestApplicationBuilder.CreateWithResource<ProjectResource>(testProjectResourceName, builder =>
{
var projectBuilder = builder.AddProject(testProjectResourceName, TestDataBuilders.GetTestProjectPath());
var result = projectBuilder.WithReference(localStackBuilder: null);

// Should return the same builder
if (!ReferenceEquals(result, projectBuilder))
{
throw new InvalidOperationException("Builder should be the same reference");
}
originalBuilder = projectBuilder;
resultBuilder = projectBuilder.WithReference(localStackBuilder: null);
});

// Should return the same builder instance
await Assert.That(resultBuilder).IsSameReferenceAs(originalBuilder);

await Assert.That(app.HasResource<ILocalStackResource>("localstack")).IsFalse();
await projectResource.ShouldNotHaveLocalStackEnabledAnnotation();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static async Task ShouldHaveLocalStackEnvironmentConfiguration(this Proje
{
ArgumentNullException.ThrowIfNull(projectResource);
ArgumentNullException.ThrowIfNull(expectedLocalStack);
#pragma warning disable MA0015
#pragma warning disable MA0015 // ArgumentNullException.ThrowIfNull should be preferred over null check
ArgumentNullException.ThrowIfNull(expectedLocalStack.Options);
#pragma warning restore MA0015

Expand Down