mirror of
https://github.com/coder/coder.git
synced 2026-09-21 20:51:01 +08:00
chore(cli): increase healthcheck timeout in TestSupportbundle (#17291)
Fixes https://github.com/coder/internal/issues/272 * Increases healthcheck timeout in tests. This seems to be the most usual cause of test failures. * Adds a non-nilness check before caching a healthcheck report. * Modifies the HTTP response code to 503 (was 404) when no healthcheck report is available. 503 seems to be a better indicator of the server state in this case, whereas 404 could be misinterpreted as a typo in the healthcheck URL.
This commit is contained in:
+6
-3
@@ -50,7 +50,8 @@ func TestSupportBundle(t *testing.T) {
|
||||
secretValue := uuid.NewString()
|
||||
seedSecretDeploymentOptions(t, &dc, secretValue)
|
||||
client, db := coderdtest.NewWithDatabase(t, &coderdtest.Options{
|
||||
DeploymentValues: dc.Values,
|
||||
DeploymentValues: dc.Values,
|
||||
HealthcheckTimeout: testutil.WaitSuperLong,
|
||||
})
|
||||
owner := coderdtest.CreateFirstUser(t, client)
|
||||
r := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
|
||||
@@ -113,7 +114,8 @@ func TestSupportBundle(t *testing.T) {
|
||||
secretValue := uuid.NewString()
|
||||
seedSecretDeploymentOptions(t, &dc, secretValue)
|
||||
client := coderdtest.New(t, &coderdtest.Options{
|
||||
DeploymentValues: dc.Values,
|
||||
DeploymentValues: dc.Values,
|
||||
HealthcheckTimeout: testutil.WaitSuperLong,
|
||||
})
|
||||
_ = coderdtest.CreateFirstUser(t, client)
|
||||
|
||||
@@ -133,7 +135,8 @@ func TestSupportBundle(t *testing.T) {
|
||||
secretValue := uuid.NewString()
|
||||
seedSecretDeploymentOptions(t, &dc, secretValue)
|
||||
client, db := coderdtest.NewWithDatabase(t, &coderdtest.Options{
|
||||
DeploymentValues: dc.Values,
|
||||
DeploymentValues: dc.Values,
|
||||
HealthcheckTimeout: testutil.WaitSuperLong,
|
||||
})
|
||||
admin := coderdtest.CreateFirstUser(t, client)
|
||||
r := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
|
||||
|
||||
Reference in New Issue
Block a user