Skip to content

Commit

Permalink
test(all): Update container healthcheck configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
bartventer committed Jun 14, 2024
1 parent 967d574 commit 461a7e2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
11 changes: 6 additions & 5 deletions memcache/memcache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ func setupMemcached(t *testing.T) *memcacheCache {
ExposedPorts: []string{defaultPort},
ConfigModifier: func(c *container.Config) {
c.Healthcheck = &container.HealthConfig{
Test: []string{"CMD", "nc", "-vn", "-w", "1", "localhost", defaultPort},
Interval: 30 * time.Second,
Timeout: 10 * time.Second,
Retries: 3,
StartPeriod: 5 * time.Second,
Test: []string{"CMD", "nc", "-vn", "-w", "1", "localhost", defaultPort},
Interval: 30 * time.Second,
Timeout: 30 * time.Second,
Retries: 5,
StartPeriod: 15 * time.Second,
StartInterval: 5 * time.Second,
}
},
WaitingFor: wait.ForHealthCheck(),
Expand Down
11 changes: 6 additions & 5 deletions redis/redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ func setupRedis(t *testing.T) *redisCache {
ExposedPorts: []string{defaultPort},
ConfigModifier: func(c *container.Config) {
c.Healthcheck = &container.HealthConfig{
Test: []string{"CMD", "redis-cli", "ping"},
Interval: 30 * time.Second,
Timeout: 10 * time.Second,
Retries: 3,
StartPeriod: 5 * time.Second,
Test: []string{"CMD", "redis-cli", "ping"},
Interval: 30 * time.Second,
Timeout: 30 * time.Second,
Retries: 5,
StartPeriod: 15 * time.Second,
StartInterval: 5 * time.Second,
}
},
WaitingFor: wait.ForHealthCheck(),
Expand Down
11 changes: 6 additions & 5 deletions rediscluster/rediscluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ func setupRedisClusterCache(t *testing.T) *redisClusterCache {
ExposedPorts: exposedPorts,
ConfigModifier: func(c *container.Config) {
c.Healthcheck = &container.HealthConfig{
Test: []string{"CMD", "redis-cli", "-c", "-p", "7000", "cluster", "info"},
Interval: 30 * time.Second,
Timeout: 10 * time.Second,
Retries: 3,
StartPeriod: 5 * time.Second,
Test: []string{"CMD", "redis-cli", "-c", "-p", "7000", "cluster", "info"},
Interval: 30 * time.Second,
Timeout: 30 * time.Second,
Retries: 5,
StartPeriod: 15 * time.Second,
StartInterval: 5 * time.Second,
}
},
WaitingFor: wait.ForHealthCheck(),
Expand Down

0 comments on commit 461a7e2

Please sign in to comment.