feat: make pgCoordinator generally available (#8419)

* pgCoord to GA, fix tests

Signed-off-by: Spike Curtis <spike@coder.com>

* Fix generation and coordinator delete RBAC

Signed-off-by: Spike Curtis <spike@coder.com>

* Fix fakeQuerier -> FakeQuerier

Signed-off-by: Spike Curtis <spike@coder.com>

---------

Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
Spike Curtis
2023-07-12 13:35:29 +04:00
committed by GitHub
parent 2e9f3e0a6b
commit b4057bd74a
35 changed files with 820 additions and 951 deletions

View File

@ -30,9 +30,7 @@ func TestServiceBanners(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
defer cancel()
adminClient := coderdenttest.New(t, &coderdenttest.Options{})
adminUser := coderdtest.CreateFirstUser(t, adminClient)
adminClient, adminUser := coderdenttest.New(t, &coderdenttest.Options{DontAddLicense: true})
// Even without a license, the banner should return as disabled.
sb, err := adminClient.Appearance(ctx)
@ -88,12 +86,12 @@ func TestServiceBanners(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
defer cancel()
client := coderdenttest.New(t, &coderdenttest.Options{
client, user := coderdenttest.New(t, &coderdenttest.Options{
Options: &coderdtest.Options{
IncludeProvisionerDaemon: true,
},
DontAddLicense: true,
})
user := coderdtest.CreateFirstUser(t, client)
license := coderdenttest.AddLicense(t, client, coderdenttest.LicenseOptions{
Features: license.Features{
codersdk.FeatureAppearance: 1,
@ -164,15 +162,14 @@ func TestCustomSupportLinks(t *testing.T) {
Value: supportLinks,
}
client := coderdenttest.New(t, &coderdenttest.Options{
client, _ := coderdenttest.New(t, &coderdenttest.Options{
Options: &coderdtest.Options{
DeploymentValues: cfg,
},
})
coderdtest.CreateFirstUser(t, client)
coderdenttest.AddLicense(t, client, coderdenttest.LicenseOptions{
Features: license.Features{
codersdk.FeatureAppearance: 1,
LicenseOptions: &coderdenttest.LicenseOptions{
Features: license.Features{
codersdk.FeatureAppearance: 1,
},
},
})
@ -187,9 +184,8 @@ func TestCustomSupportLinks(t *testing.T) {
func TestDefaultSupportLinks(t *testing.T) {
t.Parallel()
client := coderdenttest.New(t, nil)
coderdtest.CreateFirstUser(t, client)
// Don't need to set the license, as default links are passed without it.
client, _ := coderdenttest.New(t, &coderdenttest.Options{DontAddLicense: true})
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitMedium)
defer cancel()