Skip to content
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

Use the stable build of passwordless-server in tests #77

Merged
merged 1 commit into from
Nov 21, 2023
Merged
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
12 changes: 7 additions & 5 deletions tests/Passwordless.Tests/Fixtures/TestApiFixture.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Globalization;
using System.IO;
using System.Net;
using System.Net.Http;
Expand Down Expand Up @@ -32,13 +33,14 @@ public TestApiFixture()
{
_apiContainer = new ContainerBuilder()
// https://github.com/passwordless/passwordless-server/pkgs/container/passwordless-test-api
// TODO: replace with ':stable' after the next release of the server.
.WithImage("ghcr.io/passwordless/passwordless-test-api:latest")
.WithImage("ghcr.io/passwordless/passwordless-test-api:stable")
// Make sure we always have the latest version of the image
.WithImagePullPolicy(PullPolicy.Always)
// Run in development environment to execute migrations
// Run in development environment to enable migrations
.WithEnvironment("ASPNETCORE_ENVIRONMENT", "Development")
.WithEnvironment("ASPNETCORE_HTTP_PORTS", ApiPort.ToString())
// Explicitly set the HTTP port to avoid relying on the default value
.WithEnvironment("ASPNETCORE_HTTP_PORTS", ApiPort.ToString(CultureInfo.InvariantCulture))
// We need the management key to create apps
.WithEnvironment("PasswordlessManagement__ManagementKey", ManagementKey)
.WithPortBinding(ApiPort, true)
// Wait until the API is launched, has performed migrations, and is ready to accept requests
Expand Down Expand Up @@ -85,7 +87,7 @@ public async Task<IPasswordlessClient> CreateClientAsync()
{
using var response = await _http.PostAsJsonAsync(
$"{PublicApiUrl}/admin/apps/app{Guid.NewGuid():N}/create",
new { AdminEmail = "foo@bar.com", EventLoggingIsEnabled = true }
new { AdminEmail = "test@passwordless.dev" }
);

if (!response.IsSuccessStatusCode)
Expand Down
Loading