File tree 7 files changed +8
-15
lines changed
7 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -498,7 +498,6 @@ func (m testModel) doneCmd() tea.Cmd {
498
498
499
499
func (m testModel ) Update (msg tea.Msg ) (testModel , tea.Cmd ) {
500
500
switch msg := msg .(type ) {
501
-
502
501
case testModelMsgDone :
503
502
return m , nil
504
503
Original file line number Diff line number Diff line change 15
15
package dockerutil
16
16
17
17
import (
18
- "context"
19
18
"reflect"
20
19
"testing"
21
20
)
22
21
23
22
func TestComposeConfigCmd (t * testing.T ) {
24
- ctx := context . Background ()
23
+ ctx := t . Context ()
25
24
26
25
tests := []struct {
27
26
name string
Original file line number Diff line number Diff line change 15
15
package dockerutil
16
16
17
17
import (
18
- "context"
19
18
"reflect"
20
19
"testing"
21
20
)
22
21
23
22
func TestComposeDownCmd (t * testing.T ) {
24
- ctx := context . Background ()
23
+ ctx := t . Context ()
25
24
26
25
tests := []struct {
27
26
name string
Original file line number Diff line number Diff line change 15
15
package dockerutil
16
16
17
17
import (
18
- "context"
19
18
"reflect"
20
19
"testing"
21
20
)
22
21
23
22
func TestComposePsCmd (t * testing.T ) {
24
- ctx := context . Background ()
23
+ ctx := t . Context ()
25
24
26
25
tests := []struct {
27
26
name string
Original file line number Diff line number Diff line change 15
15
package dockerutil
16
16
17
17
import (
18
- "context"
19
18
"reflect"
20
19
"testing"
21
20
)
22
21
23
22
func TestComposePullCmd (t * testing.T ) {
24
- ctx := context . Background ()
23
+ ctx := t . Context ()
25
24
26
25
tests := []struct {
27
26
name string
Original file line number Diff line number Diff line change 15
15
package dockerutil
16
16
17
17
import (
18
- "context"
19
18
"reflect"
20
19
"testing"
21
20
)
22
21
23
22
func TestComposeUpCmd (t * testing.T ) {
24
- ctx := context . Background ()
23
+ ctx := t . Context ()
25
24
26
25
tests := []struct {
27
26
name string
Original file line number Diff line number Diff line change @@ -32,11 +32,10 @@ import (
32
32
"github.com/conduitio/benchi/config"
33
33
"github.com/conduitio/benchi/dockerutil"
34
34
"github.com/conduitio/benchi/metrics"
35
- "github.com/docker/docker/client"
36
- "github.com/sourcegraph/conc/pool"
37
-
38
35
_ "github.com/conduitio/benchi/metrics/conduit"
39
36
_ "github.com/conduitio/benchi/metrics/prometheus"
37
+ "github.com/docker/docker/client"
38
+ "github.com/sourcegraph/conc/pool"
40
39
)
41
40
42
41
const (
@@ -384,7 +383,7 @@ func (r *TestRunner) runTest(ctx context.Context) (err error) {
384
383
defer logTicker .Stop ()
385
384
386
385
for {
387
- logger .Info ("Test in progress" , "time-left" , endTestAt . Sub ( time .Now () ).Truncate (time .Second ))
386
+ logger .Info ("Test in progress" , "time-left" , time .Until ( endTestAt ).Truncate (time .Second ))
388
387
select {
389
388
case <- ctx .Done ():
390
389
if ! errors .Is (ctx .Err (), context .DeadlineExceeded ) {
You can’t perform that action at this time.
0 commit comments