Skip to content

Commit 08debf6

Browse files
committed
Adapt tooling to the new command implementation
- use internal/com instead of icmd - move pty from test/internal to internal - update go mod, sum, and depguard Signed-off-by: apostasie <[email protected]>
1 parent 3ce3c86 commit 08debf6

File tree

9 files changed

+191
-261
lines changed

9 files changed

+191
-261
lines changed

mod/tigron/.golangci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ linters:
3030
- github.com/creack/pty
3131
- golang.org/x/sync
3232
- golang.org/x/term
33-
- gotest.tools/v3
3433
- go.uber.org/goleak
3534
staticcheck:
3635
checks:

mod/tigron/go.mod

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
module github.com/containerd/nerdctl/mod/tigron
22

3-
go 1.23
3+
go 1.23.0
44

55
require (
66
github.com/creack/pty v1.1.24
77
go.uber.org/goleak v1.3.0
8-
golang.org/x/sync v0.11.0
9-
golang.org/x/term v0.29.0
10-
gotest.tools/v3 v3.5.2
8+
golang.org/x/sync v0.12.0
9+
golang.org/x/term v0.30.0
1110
)
1211

13-
require (
14-
github.com/google/go-cmp v0.6.0 // indirect
15-
golang.org/x/sys v0.30.0 // indirect
16-
)
12+
require golang.org/x/sys v0.31.0 // indirect

mod/tigron/go.sum

+6-10
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@ github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
22
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
33
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
44
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5-
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
6-
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
75
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
86
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
97
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
108
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
119
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
1210
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
13-
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
14-
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
15-
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
16-
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
17-
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
18-
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
11+
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
12+
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
13+
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
14+
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
15+
golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y=
16+
golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g=
1917
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
2018
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
21-
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
22-
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=

mod/tigron/test/internal/consts.go renamed to mod/tigron/internal/exit.go

+8-5
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@
1717
// Package internal provides an assert library, pty, a command wrapper, and a leak detection library
1818
// for internal use in Tigron.
1919
// The objective for these is not to become generic use-cases libraries, but instead to deliver what
20-
// Tigron needs in the simplest possible form.
20+
// Tigron needs
21+
// in the simplest possible form.
2122
package internal
2223

23-
// This is duplicated form `expect` to avoid circular imports.
24+
// This is duplicated from `expect` to avoid circular imports.
2425
const (
2526
ExitCodeSuccess = 0
26-
ExitCodeGenericFail = -1
27-
ExitCodeNoCheck = -2
28-
ExitCodeTimeout = -3
27+
ExitCodeGenericFail = -10
28+
ExitCodeNoCheck = -11
29+
ExitCodeTimeout = -12
30+
ExitCodeSignaled = -13
31+
// ExitCodeCancelled = -14.
2932
)
File renamed without changes.

mod/tigron/test/case.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func (test *Case) Run(t *testing.T) {
111111

112112
var custCom CustomizableCommand
113113
if registeredTestable == nil {
114-
custCom = &GenericCommand{}
114+
custCom = NewGenericCommand()
115115
} else {
116116
custCom = registeredTestable.CustomCommand(test, test.t)
117117
}

0 commit comments

Comments
 (0)