forked from LaconicNetwork/kompose
@@ -241,7 +241,7 @@ func (s *ServiceConfig) GetOSUpdateStrategy() *deployapi.RollingDeploymentStrate
|
||||
|
||||
delay := time.Second * 1
|
||||
if config.Delay != 0 {
|
||||
delay = config.Delay
|
||||
delay = time.Duration(config.Delay)
|
||||
}
|
||||
|
||||
interval := cast.ToInt64(delay.Seconds())
|
||||
|
||||
@@ -176,7 +176,7 @@ func (c *Compose) LoadFile(files []string) (kobject.KomposeObject, error) {
|
||||
}
|
||||
return komposeObject, nil
|
||||
// Use docker/cli for 3
|
||||
case "3", "3.0", "3.1", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7":
|
||||
case "3", "3.0", "3.1", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8":
|
||||
komposeObject, err := parseV3(files)
|
||||
if err != nil {
|
||||
return kobject.KomposeObject{}, err
|
||||
|
||||
@@ -37,14 +37,19 @@ func durationPtr(value time.Duration) *time.Duration {
|
||||
return &value
|
||||
}
|
||||
|
||||
func durationTypesPtr(value time.Duration) *types.Duration {
|
||||
target := types.Duration(value)
|
||||
return &target
|
||||
}
|
||||
|
||||
func TestParseHealthCheck(t *testing.T) {
|
||||
helperValue := uint64(2)
|
||||
check := types.HealthCheckConfig{
|
||||
Test: []string{"CMD-SHELL", "echo", "foobar"},
|
||||
Timeout: durationPtr(1 * time.Second),
|
||||
Interval: durationPtr(2 * time.Second),
|
||||
Timeout: durationTypesPtr(1 * time.Second),
|
||||
Interval: durationTypesPtr(2 * time.Second),
|
||||
Retries: &helperValue,
|
||||
StartPeriod: durationPtr(3 * time.Second),
|
||||
StartPeriod: durationTypesPtr(3 * time.Second),
|
||||
}
|
||||
|
||||
// CMD-SHELL or SHELL is included Test within docker/cli, thus we remove the first value in Test
|
||||
|
||||
Reference in New Issue
Block a user