chore: upgrade dependencies (#2589)
* chore: upgrade dependencies * fix: linter errors * chore: bump version of golangci-lint * chore: go mod tidy * fix: failing test * fix: update version of upload-artifact to v4 * chore: format test output with gotestfmt * fix: typo in test exec * fix: failing tests * fix: windows unit test execution * fix: windows unit test execution * fix: whitespace
This commit is contained in:
@@ -243,7 +243,6 @@ func (rc *RunContext) startHostEnvironment() common.Executor {
|
||||
}
|
||||
}
|
||||
|
||||
//nolint:gocyclo
|
||||
func (rc *RunContext) startJobContainer() common.Executor {
|
||||
return func(ctx context.Context) error {
|
||||
logger := common.Logger(ctx)
|
||||
@@ -344,7 +343,7 @@ func (rc *RunContext) startJobContainer() common.Executor {
|
||||
}
|
||||
|
||||
rc.cleanUpJobContainer = func(ctx context.Context) error {
|
||||
reuseJobContainer := func(ctx context.Context) bool {
|
||||
reuseJobContainer := func(_ context.Context) bool {
|
||||
return rc.Config.ReuseContainers
|
||||
}
|
||||
|
||||
@@ -477,7 +476,7 @@ func (rc *RunContext) GetNodeToolFullPath(ctx context.Context) string {
|
||||
}
|
||||
|
||||
func (rc *RunContext) ApplyExtraPath(ctx context.Context, env *map[string]string) {
|
||||
if rc.ExtraPath != nil && len(rc.ExtraPath) > 0 {
|
||||
if len(rc.ExtraPath) > 0 {
|
||||
path := rc.JobContainer.GetPathVariableName()
|
||||
if rc.JobContainer.IsEnvironmentCaseInsensitive() {
|
||||
// On windows system Path and PATH could also be in the map
|
||||
@@ -568,11 +567,11 @@ func (rc *RunContext) waitForServiceContainer(c container.ExecutionsEnvironment)
|
||||
return func(ctx context.Context) error {
|
||||
sctx, cancel := context.WithTimeout(ctx, time.Minute*5)
|
||||
defer cancel()
|
||||
health := container.ContainerHealthStarting
|
||||
health := container.HealthStarting
|
||||
delay := time.Second
|
||||
for i := 0; ; i++ {
|
||||
health = c.GetHealth(sctx)
|
||||
if health != container.ContainerHealthStarting || i > 30 {
|
||||
if health != container.HealthStarting || i > 30 {
|
||||
break
|
||||
}
|
||||
time.Sleep(delay)
|
||||
@@ -581,7 +580,7 @@ func (rc *RunContext) waitForServiceContainer(c container.ExecutionsEnvironment)
|
||||
delay = 10 * time.Second
|
||||
}
|
||||
}
|
||||
if health == container.ContainerHealthHealthy {
|
||||
if health == container.HealthHealthy {
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("service container failed to start")
|
||||
@@ -994,9 +993,9 @@ func nestedMapLookup(m map[string]interface{}, ks ...string) (rval interface{})
|
||||
return rval
|
||||
} else if m, ok = rval.(map[string]interface{}); !ok {
|
||||
return nil
|
||||
} else { // 1+ more keys
|
||||
return nestedMapLookup(m, ks[1:]...)
|
||||
}
|
||||
// 1+ more keys
|
||||
return nestedMapLookup(m, ks[1:]...)
|
||||
}
|
||||
|
||||
func (rc *RunContext) withGithubEnv(ctx context.Context, github *model.GithubContext, env map[string]string) map[string]string {
|
||||
|
||||
Reference in New Issue
Block a user