This can be used in tests to get access to a controller that behaves just like a dev controller but doesn't require the normal Command bits (UI, etc). This can be enhanced over time as needed; for now it's pretty simple but it's good enough to be used for API tests. A simple project create/read API test is added as well, which serves to show the programmatic model (as well as test those functions at the API level).
14 lines
213 B
Go
14 lines
213 B
Go
package controller
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func Test_TestController(t *testing.T) {
|
|
t.Run("startup and shutdown", func(t *testing.T) {
|
|
t.Parallel()
|
|
tc := NewTestController(t, nil)
|
|
defer tc.Shutdown()
|
|
})
|
|
}
|