MCPcopy Create free account
hub / github.com/convox/rack / testClientWait

Function testClientWait

pkg/cli/cli_test.go:35–58  ·  view source on GitHub ↗
(t *testing.T, wait time.Duration, fn func(*cli.Engine, *mocksdk.Interface))

Source from the content-addressed store, hash-verified

33}
34
35func testClientWait(t *testing.T, wait time.Duration, fn func(*cli.Engine, *mocksdk.Interface)) {
36 os.Unsetenv("CONVOX_HOST")
37 os.Unsetenv("CONVOX_PASSWORD")
38 os.Unsetenv("CONVOX_RACK")
39 os.Unsetenv("RACK_URL")
40
41 i := &mocksdk.Interface{}
42
43 cli.WaitDuration = wait
44 helpers.ProviderWaitDuration = wait
45
46 e := cli.New("convox", "test")
47
48 e.Client = i
49
50 tmp, err := os.MkdirTemp("", "")
51 require.NoError(t, err)
52 e.Settings = tmp
53 // defer os.RemoveAll(tmp)
54
55 fn(e, i)
56
57 i.AssertExpectations(t)
58}
59
60func testExecute(e *cli.Engine, cmd string, stdin io.Reader) (*result, error) {
61 ctx, cancel := context.WithCancel(context.Background())

Callers 8

TestDeployWaitFunction · 0.85
TestRackWaitFunction · 0.85
TestRackWaitErrorFunction · 0.85
TestAppsCancelWaitFunction · 0.85
TestAppsWaitFunction · 0.85
TestAppsWaitErrorFunction · 0.85
TestAppsRollbackFunction · 0.85
testClientFunction · 0.85

Calls 1

NewFunction · 0.92

Tested by

no test coverage detected