Skip to content

Commit

Permalink
chore(api/v1): Move registry package. Again ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanilves committed May 10, 2018
1 parent 23a19c5 commit ae5d00a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package registry
package container

import (
"bufio"
Expand Down Expand Up @@ -78,8 +78,8 @@ func verify(hostname string) error {
return err
}

// LaunchContainer launches a Docker container with Docker registry inside
func LaunchContainer() (*Container, error) {
// Launch launches a Docker container with Docker registry inside
func Launch() (*Container, error) {
dockerClient, _ := getDockerClient()

hostPort := getRandomPort()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package registry
package container

import (
"testing"
Expand Down Expand Up @@ -64,7 +64,7 @@ func TestRunGuaranteedFailure(t *testing.T) {
}

func testVerify(t *testing.T) {
c, _ := LaunchContainer()
c, _ := Launch()

defer c.Destroy()

Expand All @@ -81,8 +81,8 @@ func testVerifyGuaranteedFailure(t *testing.T) {
}
}

func TestLaunchContainerAndThanDestroyIt(t *testing.T) {
c, err := LaunchContainer()
func TestLaunchAndThanDestroyIt(t *testing.T) {
c, err := Launch()
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -113,7 +113,7 @@ func TestLaunchManyContainersWithoutNamingCollisions(t *testing.T) {

for c := 0; c < createContainers; c++ {
go func() {
c, err := LaunchContainer()
c, err := Launch()
if err != nil {
done <- err
return
Expand All @@ -131,7 +131,7 @@ func TestLaunchManyContainersWithoutNamingCollisions(t *testing.T) {
}

func TestSeedContainerWithImages(t *testing.T) {
c, err := LaunchContainer()
c, err := Launch()
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -175,7 +175,7 @@ func TestSeedContainerWithImages(t *testing.T) {
}

func TestSeedContainerWithImagesGuaranteedFailure(t *testing.T) {
c, err := LaunchContainer()
c, err := Launch()
if err != nil {
t.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions api/v1/v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/ivanilves/lstags/api/internal/registry"
registrycontainer "github.com/ivanilves/lstags/api/v1/registry/container"
"github.com/ivanilves/lstags/repository"
)

Expand All @@ -28,7 +28,7 @@ func runEnd2EndJob(pullRefs, seedRefs []string) ([]string, error) {
return nil, err
}

registryContainer, err := registry.LaunchContainer()
registryContainer, err := registrycontainer.Launch()
if err != nil {
return nil, err
}
Expand Down

0 comments on commit ae5d00a

Please sign in to comment.