mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
chore: refactor ResolveAutostart tests to use dbfake (#10603)
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/coder/coder/v2/coderd/database"
|
||||
"github.com/coder/coder/v2/coderd/database/dbmem"
|
||||
"github.com/coder/coder/v2/coderd/database/pubsub"
|
||||
|
||||
@ -67,6 +68,11 @@ func New(t *testing.T, options *Options) (*codersdk.Client, codersdk.CreateFirst
|
||||
return client, user
|
||||
}
|
||||
|
||||
func NewWithDatabase(t *testing.T, options *Options) (*codersdk.Client, database.Store, codersdk.CreateFirstUserResponse) {
|
||||
client, _, api, user := NewWithAPI(t, options)
|
||||
return client, api.Database, user
|
||||
}
|
||||
|
||||
func NewWithAPI(t *testing.T, options *Options) (
|
||||
*codersdk.Client, io.Closer, *coderd.API, codersdk.CreateFirstUserResponse,
|
||||
) {
|
||||
|
Reference in New Issue
Block a user