Skip to content
This repository has been archived by the owner on Oct 2, 2022. It is now read-only.

Commit

Permalink
1.0.0: First stable version
Browse files Browse the repository at this point in the history
This release tags the first stable version for ContainerSSH 0.4.0.
  • Loading branch information
Janos Pasztor committed Apr 1, 2021
1 parent 2df8b00 commit ed74148
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog

## 1.0.0: First stable version

This release tags the first stable version for ContainerSSH 0.4.0.

## 0.9.3: Version bump, codes doc

This release adds the CODES.md file with the documentation of message codes and
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -3,7 +3,7 @@ module github.com/containerssh/service
go 1.14

require (
github.com/containerssh/log v0.9.13
github.com/containerssh/log v1.0.0
github.com/stretchr/testify v1.7.0
)

Expand Down
4 changes: 4 additions & 0 deletions go.sum
Expand Up @@ -4,15 +4,19 @@ github.com/containerssh/log v0.9.12 h1:iEXDca90d6njCQpzvUWHghpEBxi0eeqVcCSmGwdDQ
github.com/containerssh/log v0.9.12/go.mod h1:uVuUPoZsJYi2KoV9+lgPeB/gWuXeUTD3AoVxc4y+tKY=
github.com/containerssh/log v0.9.13 h1:jBSrFaxZNGwkjHU6y/efYI8lyG8KIFR5aOIeOnNzquE=
github.com/containerssh/log v0.9.13/go.mod h1:uVuUPoZsJYi2KoV9+lgPeB/gWuXeUTD3AoVxc4y+tKY=
github.com/containerssh/log v1.0.0 h1:nOSqNqh7cXIa+Iy+Lx2CA+wpkrqDqcQh4EVoEvSaxU8=
github.com/containerssh/log v1.0.0/go.mod h1:7Gy+sx0H1UDtjYBySvK0CnXRRHPHZPXMsa9MYmLBI0I=
github.com/containerssh/structutils v0.9.0 h1:pz4xl5ZrPnpdSx7B/ru8Fj3oU3vOtx1jprIuSkm5s7o=
github.com/containerssh/structutils v0.9.0/go.mod h1:zirdwNXan3kuTpsJp9Gl3W6VQz0fexqMySqxmfviSjw=
github.com/containerssh/structutils v1.0.0/go.mod h1:Dp5tCtnkT19A9BFNP4+flL5R+THvBgp95eO640fR+ow=
github.com/creasty/defaults v1.5.1 h1:j8WexcS3d/t4ZmllX4GEkl4wIB/trOr035ajcLHCISM=
github.com/creasty/defaults v1.5.1/go.mod h1:FPZ+Y0WNrbqOVw+c6av63eyHUAl6pMHZwqLPvXUZGfY=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
Expand Down
30 changes: 15 additions & 15 deletions pool_test.go
Expand Up @@ -181,7 +181,7 @@ func TestTwoServices(t *testing.T) {
func(s service.Service, l service.Lifecycle, state service.State) {
testLock.Lock()
defer testLock.Unlock()
serviceStates1 = append(serviceStates1, state)
*serviceStates1 = append(*serviceStates1, state)
},
)

Expand All @@ -190,7 +190,7 @@ func TestTwoServices(t *testing.T) {
func(s service.Service, l service.Lifecycle, state service.State) {
testLock.Lock()
defer testLock.Unlock()
serviceStates2 = append(serviceStates2, state)
*serviceStates2 = append(*serviceStates2, state)
},
)

Expand All @@ -211,9 +211,9 @@ func TestTwoServices(t *testing.T) {
func verifyTwoServiceExecutionOrder(
t *testing.T,
testLock *sync.Mutex,
serviceStates1 []service.State,
serviceStates2 []service.State,
poolStates []service.State,
serviceStates1 *[]service.State,
serviceStates2 *[]service.State,
poolStates *[]service.State,
) {
testLock.Lock()
defer testLock.Unlock()
Expand All @@ -223,23 +223,23 @@ func verifyTwoServiceExecutionOrder(
service.StateRunning,
service.StateStopping,
service.StateStopped,
}, serviceStates1,
}, *serviceStates1,
)
assert.Equal(
t, []service.State{
service.StateStarting,
service.StateRunning,
service.StateStopping,
service.StateStopped,
}, serviceStates2,
}, *serviceStates2,
)
assert.Equal(
t, []service.State{
service.StateStarting,
service.StateRunning,
service.StateStopping,
service.StateStopped,
}, poolStates,
}, *poolStates,
)
}

Expand All @@ -248,17 +248,17 @@ func setupPoolForTwoServiceTest(t *testing.T, testLock *sync.Mutex) (
service.Lifecycle,
chan bool,
chan bool,
[]service.State,
[]service.State,
[]service.State,
*[]service.State,
*[]service.State,
*[]service.State,
) {
pool := service.NewPool(service.NewLifecycleFactory(), log.NewTestLogger(t))
poolLifecycle := service.NewLifecycle(pool)
poolStarted := make(chan bool)
poolStopped := make(chan bool)
var poolStates []service.State
var serviceStates1 []service.State
var serviceStates2 []service.State
poolStates := &[]service.State{}
serviceStates1 := &[]service.State{}
serviceStates2 := &[]service.State{}
poolLifecycle.OnRunning(
func(s service.Service, l service.Lifecycle) {
poolStarted <- true
Expand All @@ -269,7 +269,7 @@ func setupPoolForTwoServiceTest(t *testing.T, testLock *sync.Mutex) (
testLock.Lock()
defer testLock.Unlock()

poolStates = append(poolStates, state)
*poolStates = append(*poolStates, state)
},
)
return pool, poolLifecycle, poolStarted, poolStopped, poolStates, serviceStates1, serviceStates2
Expand Down

0 comments on commit ed74148

Please sign in to comment.