mirror of
https://github.com/FlipsideCrypto/convox.git
synced 2026-02-06 10:56:56 +00:00
add waits for log timing during tests (#57)
This commit is contained in:
parent
aeac471dcf
commit
e34125f046
@ -554,7 +554,7 @@ func TestAppsParamsSetError(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAppsParamsSetClassic(t *testing.T) {
|
||||
testClient(t, func(e *cli.Engine, i *mocksdk.Interface) {
|
||||
testClientWait(t, 50*time.Millisecond, func(e *cli.Engine, i *mocksdk.Interface) {
|
||||
i.On("SystemGet").Return(fxSystemClassic(), nil)
|
||||
i.On("AppParametersSet", "app1", map[string]string{"Foo": "bar", "Baz": "qux"}).Return(nil)
|
||||
i.On("AppGet", "app1").Return(fxAppUpdating(), nil).Twice()
|
||||
|
||||
@ -6,6 +6,7 @@ import (
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/convox/convox/pkg/cli"
|
||||
mocksdk "github.com/convox/convox/pkg/mock/sdk"
|
||||
@ -16,7 +17,7 @@ import (
|
||||
)
|
||||
|
||||
func TestBuild(t *testing.T) {
|
||||
testClient(t, func(e *cli.Engine, i *mocksdk.Interface) {
|
||||
testClientWait(t, 50*time.Millisecond, func(e *cli.Engine, i *mocksdk.Interface) {
|
||||
i.On("SystemGet").Return(fxSystem(), nil)
|
||||
i.On("ObjectStore", "app1", mock.AnythingOfType("string"), mock.Anything, structs.ObjectStoreOptions{}).Return(&fxObject, nil).Run(func(args mock.Arguments) {
|
||||
require.Regexp(t, `tmp/[0-9a-f]{30}\.tgz`, args.Get(1).(string))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user