Add TestController (#50)
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).
This commit is contained in:
1 parent
2aca5fff03
commit
f8b456f3a7
13 files changed
+306
-32
No files matched your search
@@ -0,0 +1,13 @@
|
||||
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()
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user