Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use of uninitialized global variable #135

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/compose_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ import (
func ComposeLogs(o *option.Option) {
services := []string{"svc1_compose_logs", "svc2_compose_logs"}
containerNames := []string{"container1_compose_logs", "container2_compose_logs"}
imageNames := []string{localImages[defaultImage], localImages[defaultImage]}

ginkgo.Describe("Compose logs command", func() {
var buildContext string
var composeFilePath string
var imageNames []string

ginkgo.BeforeEach(func() {
imageNames = []string{localImages[defaultImage], localImages[defaultImage]}
command.RemoveAll(o)
buildContext, composeFilePath = createComposeYmlForLogsCmd(services, imageNames, containerNames)
ginkgo.DeferCleanup(os.RemoveAll, buildContext)
Expand Down
4 changes: 3 additions & 1 deletion tests/compose_ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ import (
func ComposePs(o *option.Option) {
services := []string{"svc1_compose_ps", "svc2_compose_ps"}
containerNames := []string{"container1_compose_ps", "container2_compose_ps"}
imageNames := []string{localImages[defaultImage], localImages[defaultImage]}

ginkgo.Describe("Compose ps command", func() {
var composeContext string
var composeFilePath string
var imageNames []string

ginkgo.BeforeEach(func() {
imageNames = []string{localImages[defaultImage], localImages[defaultImage]}
command.RemoveAll(o)
composeContext, composeFilePath = createComposeYmlForPsCmd(services, imageNames, containerNames)
ginkgo.DeferCleanup(os.RemoveAll, composeContext)
Expand Down
4 changes: 3 additions & 1 deletion tests/compose_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ import (
// ComposePull tests functionality of `compose pull` command.
func ComposePull(o *option.Option) {
services := []string{"svc1_compose_pull", "svc2_compose_pull"}
imageNames := []string{localImages[defaultImage], localImages[olderAlpineImage]}
ginkgo.Describe("Compose pull command", func() {
var composeContext string
var composeFilePath string
var imageNames []string

ginkgo.BeforeEach(func() {
imageNames = []string{localImages[defaultImage], localImages[olderAlpineImage]}
command.RemoveAll(o)
composeContext, composeFilePath = createComposeYmlForPullCmd(services, imageNames)
ginkgo.DeferCleanup(os.RemoveAll, composeContext)
Expand Down
4 changes: 3 additions & 1 deletion tests/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ func SetupLocalRegistry(o *option.Option) {
// split image tag according to spec
// https://github.com/distribution/distribution/blob/d0deff9cd6c2b8c82c6f3d1c713af51df099d07b/reference/reference.go
_, name, _ := strings.Cut(ref, "/")
command.Run(o, "pull", ref)
// allow up to a minute for remote pulls to account for external network
// latency/throughput issues or throttling (default is 10 seconds)
command.New(o, "pull", ref).WithTimeoutInSeconds(60).Run()
localRef := fmt.Sprintf("localhost:%d/%s", hostPort, name)
command.Run(o, "tag", ref, localRef)
command.Run(o, "push", localRef)
Expand Down
Loading