mirror of
https://github.com/coder/coder.git
synced 2026-06-04 13:38:21 +00:00
20 lines
370 B
Go
20 lines
370 B
Go
package cli_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/coder/coder/cli/clitest"
|
|
)
|
|
|
|
func TestDaemon(t *testing.T) {
|
|
t.Parallel()
|
|
ctx, cancelFunc := context.WithCancel(context.Background())
|
|
go cancelFunc()
|
|
root, _ := clitest.New(t, "daemon")
|
|
err := root.ExecuteContext(ctx)
|
|
require.ErrorIs(t, err, context.Canceled)
|
|
}
|