Hosting integration for Zitadel#1100
Conversation
|
I'm seeing failures in the test log starting here: https://github.com/CommunityToolkit/Aspire/actions/runs/21052154522/job/60540747581?pr=1100#step:6:497 The tests themselves don't seem to report failing, so possibly the Do the test pass locally? |
|
@aaronpowell the problem seems to happen when |
|
I don't mind continuing to work on this, I just need input on why |
|
@aaronpowell any input on the |
|
@dealloc sorry, been under the pump with some other stuff recently. I've just pushed a commit which fixes the timeout issue. I think some of the asserts are now failing though |
|
no worries, just wanted to make sure this PR didn't slip under the radar :) it seems that [Fact]
public async Task AddZitadel_Sets_Default_Environment_Variables()
{
var builder = DistributedApplication.CreateBuilder();
var zitadel = builder.AddZitadel("zitadel");
var env = await zitadel.Resource.GetEnvironmentVariablesAsync();
Assert.Equal("false", env["ZITADEL_TLS_ENABLED"]);
Assert.Equal("false", env["ZITADEL_EXTERNALSECURE"]);
Assert.Equal("zitadel.dev.localhost", env["ZITADEL_EXTERNALDOMAIN"]);
Assert.Equal("false", env["ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_REQUIRED"]);
Assert.Equal("false", env["ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORDCHANGEREQUIRED"]);
}I suspect I need to do something so Aspire actually calls the callback for it? |
|
To test that, I think you'll need to actually start the app host. Looking into the Aspire source I found this test https://github.com/dotnet/aspire/blob/a6b68c75e6a789e938c9e6630073e27231fb06f9/tests/Aspire.Hosting.Tests/DistributedApplicationTests.cs#L768-L809 https://github.com/dotnet/aspire/blob/a6b68c75e6a789e938c9e6630073e27231fb06f9/tests/Aspire.Hosting.Tests/DistributedApplicationTests.cs#L797 is a test against something setup in the callback to We've got a bunch of tests that do that already in the toolkit codebase you can use as reference. |
This avoids a deadlock when the resource is trying to resolve the endpoint before it has been fully configured by Aspire
11aa744 to
b0341b3
Compare
|
turns out the specific assertion I was making was incorrect, it's never set to |
**Closes #1015 **
This PR is a continuation of the previous PR for Zitadel support: #1021
PR Checklist
Other information