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

[release/8.0] Change which category/group servers are placed under in PGAdmin. #3964

Merged
merged 2 commits into from
Apr 26, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.PostgreSQL/PgAdminConfigWriterHook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public Task AfterEndpointsAllocatedAsync(DistributedApplicationModel appModel, C

writer.WriteStartObject($"{serverIndex}");
writer.WriteString("Name", postgresInstance.Name);
writer.WriteString("Group", "Aspire instances");
writer.WriteString("Group", "Servers");
writer.WriteString("Host", endpoint.ContainerHost);
writer.WriteNumber("Port", endpoint.Port);
writer.WriteString("Username", "postgres");
Expand Down
4 changes: 2 additions & 2 deletions tests/Aspire.Hosting.Tests/Postgres/AddPostgresTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ public void WithPostgresProducesValidServersJsonFile(string containerHost)

// Make sure the first server is correct.
Assert.Equal(pg1.Resource.Name, servers.GetProperty("1").GetProperty("Name").GetString());
Assert.Equal("Aspire instances", servers.GetProperty("1").GetProperty("Group").GetString());
Assert.Equal("Servers", servers.GetProperty("1").GetProperty("Group").GetString());
Assert.Equal(containerHost, servers.GetProperty("1").GetProperty("Host").GetString());
Assert.Equal(5001, servers.GetProperty("1").GetProperty("Port").GetInt32());
Assert.Equal("postgres", servers.GetProperty("1").GetProperty("Username").GetString());
Expand All @@ -416,7 +416,7 @@ public void WithPostgresProducesValidServersJsonFile(string containerHost)

// Make sure the second server is correct.
Assert.Equal(pg2.Resource.Name, servers.GetProperty("2").GetProperty("Name").GetString());
Assert.Equal("Aspire instances", servers.GetProperty("2").GetProperty("Group").GetString());
Assert.Equal("Servers", servers.GetProperty("2").GetProperty("Group").GetString());
Assert.Equal("host2", servers.GetProperty("2").GetProperty("Host").GetString());
Assert.Equal(5002, servers.GetProperty("2").GetProperty("Port").GetInt32());
Assert.Equal("postgres", servers.GetProperty("2").GetProperty("Username").GetString());
Expand Down