Skip to content

Commit

Permalink
(#25) Use Google's UUID for generating compose's identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Nov 18, 2019
1 parent dfb14b0 commit 72e1dd5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 37 deletions.
7 changes: 4 additions & 3 deletions compose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (
"strings"
"testing"

"github.com/google/uuid"
"github.com/stretchr/testify/assert"
)

func TestLocalDockerCompose(t *testing.T) {
path := "./testresources/docker-compose.yml"

identifier := strings.ToLower(RandomString(6))
identifier := strings.ToLower(uuid.New().String())

compose := NewLocalDockerCompose([]string{path}, identifier)

Expand All @@ -36,7 +37,7 @@ func TestLocalDockerCompose(t *testing.T) {
func TestLocalDockerComposeWithEnvironment(t *testing.T) {
path := "./testresources/docker-compose.yml"

identifier := strings.ToLower(RandomString(6))
identifier := strings.ToLower(uuid.New().String())

compose := NewLocalDockerCompose([]string{path}, identifier)
destroyFn := func() {
Expand Down Expand Up @@ -66,7 +67,7 @@ func TestLocalDockerComposeWithMultipleComposeFiles(t *testing.T) {
"testresources/docker-compose-override.yml",
}

identifier := strings.ToLower(RandomString(6))
identifier := strings.ToLower(uuid.New().String())

compose := NewLocalDockerCompose(composeFiles, identifier)
destroyFn := func() {
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ require (
github.com/go-redis/redis v6.15.5+incompatible
github.com/go-sql-driver/mysql v1.4.1
github.com/gogo/protobuf v1.2.0 // indirect
github.com/google/uuid v1.1.1
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/mux v1.6.2 // indirect
github.com/kr/pretty v0.1.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
Expand Down
19 changes: 0 additions & 19 deletions utility.go

This file was deleted.

15 changes: 0 additions & 15 deletions utility_test.go

This file was deleted.

0 comments on commit 72e1dd5

Please sign in to comment.