Skip to content

Commit

Permalink
Merge branch 'main' into fix-mysql-8
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya authored Jan 22, 2024
2 parents 97535c7 + 05c56df commit b469f9f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ jobs:
ryuk-disabled: false

# The job below is a copy of the job above, but with ryuk disabled.
# It's executed in a secondary stage to avoid concurrency issues.
# It's executed in the first stage to avoid concurrency issues.
test-reaper-off:
# do not run this job if it's a PR from dependabot that is not approved yet
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.state != 'approved' && github.triggering_actor == 'dependabot[bot]') }}
name: "Test with reaper off"
needs: test
strategy:
matrix:
go-version: [1.20.x, 1.x]
Expand All @@ -61,12 +60,11 @@ jobs:
ryuk-disabled: true

# The job below is a copy of the job above, but with Docker rootless.
# It's executed in a secondary stage to avoid concurrency issues.
# It's executed in the first stage to avoid concurrency issues.
test-rootless-docker:
# do not run this job if it's a PR from dependabot that is not approved yet
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.state != 'approved' && github.triggering_actor == 'dependabot[bot]') }}
name: "Test with Rootless Docker"
needs: test
strategy:
matrix:
go-version: [1.20.x, 1.x]
Expand Down
5 changes: 4 additions & 1 deletion docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,10 @@ func TestContainerCreation(t *testing.T) {
fmt.Printf("%v", networkAliases)
t.Errorf("Expected number of connected networks %d. Got %d.", 0, len(networkAliases))
}
if len(networkAliases["bridge"]) != 0 {

if os.Getenv("XDG_RUNTIME_DIR") != "" {
t.Log("[Docker Rootless] do not assert that the container should have zero aliases in the bridge network")
} else if len(networkAliases["bridge"]) != 0 {
t.Errorf("Expected number of aliases for 'bridge' network %d. Got %d.", 0, len(networkAliases["bridge"]))
}
}
Expand Down
2 changes: 0 additions & 2 deletions from_dockerfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,4 @@ func TestBuildImageFromDockerfile_TargetDoesNotExist(t *testing.T) {
Started: true,
})
require.Error(t, err)

assert.Contains(t, err.Error(), "failed to reach build target target-foo in Dockerfile")
}
6 changes: 2 additions & 4 deletions modulegen/_template/ci.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ jobs:
ryuk-disabled: false

# The job below is a copy of the job above, but with ryuk disabled.
# It's executed in a secondary stage to avoid concurrency issues.
# It's executed in the first stage to avoid concurrency issues.
test-reaper-off:
# do not run this job if it's a PR from dependabot that is not approved yet
if: {{ "${{ !(github.event_name == 'pull_request' && github.event.pull_request.state != 'approved' && github.triggering_actor == 'dependabot[bot]') }}" }}
name: "Test with reaper off"
needs: test
strategy:
matrix:
go-version: [1.20.x, 1.x]
Expand All @@ -61,12 +60,11 @@ jobs:
ryuk-disabled: true

# The job below is a copy of the job above, but with Docker rootless.
# It's executed in a secondary stage to avoid concurrency issues.
# It's executed in the first stage to avoid concurrency issues.
test-rootless-docker:
# do not run this job if it's a PR from dependabot that is not approved yet
if: {{ "${{ !(github.event_name == 'pull_request' && github.event.pull_request.state != 'approved' && github.triggering_actor == 'dependabot[bot]') }}" }}
name: "Test with Rootless Docker"
needs: test
strategy:
matrix:
go-version: [1.20.x, 1.x]
Expand Down
4 changes: 2 additions & 2 deletions modulegen/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,11 @@ func assertModuleGithubWorkflowContent(t *testing.T, module context.Testcontaine

modulesList, err := ctx.GetModules()
require.NoError(t, err)
assert.Equal(t, " module: ["+strings.Join(modulesList, ", ")+"]", data[108])
assert.Equal(t, " module: ["+strings.Join(modulesList, ", ")+"]", data[106])

examplesList, err := ctx.GetExamples()
require.NoError(t, err)
assert.Equal(t, " module: ["+strings.Join(examplesList, ", ")+"]", data[128])
assert.Equal(t, " module: ["+strings.Join(examplesList, ", ")+"]", data[126])
}

// assert content go.mod
Expand Down

0 comments on commit b469f9f

Please sign in to comment.