mirror of
https://github.com/coder/coder.git
synced 2025-06-28 04:33:02 +00:00
* feat: Add agent authentication based on instance ID Each cloud has it's own unique instance identity signatures, which can be used for zero-token authentication. This change adds support for tracking by "instance_id", and automatically authenticating with Google Cloud. * Add test for CLI * Fix workspace agent request name * Fix race with adding to wait group * Fix name of instance identity token
26 lines
587 B
Go
26 lines
587 B
Go
package coderd_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/coder/coder/coderd/coderdtest"
|
|
)
|
|
|
|
func TestProvisionerDaemons(t *testing.T) {
|
|
// Tests for properly processing specific job types should be placed
|
|
// in their respective files.
|
|
t.Parallel()
|
|
|
|
client := coderdtest.New(t, nil)
|
|
_ = coderdtest.NewProvisionerDaemon(t, client)
|
|
require.Eventually(t, func() bool {
|
|
daemons, err := client.ProvisionerDaemons(context.Background())
|
|
require.NoError(t, err)
|
|
return len(daemons) > 0
|
|
}, 3*time.Second, 50*time.Millisecond)
|
|
}
|