forked from LaconicNetwork/kompose
Renamed pkg test to testutils.
This commit is contained in:
parent
b62fb02571
commit
4ead7156f4
@ -1,4 +1,4 @@
|
|||||||
package test
|
package testutils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -27,7 +27,7 @@ import (
|
|||||||
deployapi "github.com/openshift/origin/pkg/deploy/api"
|
deployapi "github.com/openshift/origin/pkg/deploy/api"
|
||||||
|
|
||||||
"github.com/kubernetes-incubator/kompose/pkg/kobject"
|
"github.com/kubernetes-incubator/kompose/pkg/kobject"
|
||||||
"github.com/kubernetes-incubator/kompose/pkg/test"
|
"github.com/kubernetes-incubator/kompose/pkg/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newServiceConfig() kobject.ServiceConfig {
|
func newServiceConfig() kobject.ServiceConfig {
|
||||||
@ -130,10 +130,10 @@ func TestGetGitRemote(t *testing.T) {
|
|||||||
var output string
|
var output string
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
gitDir := test.CreateLocalGitDirectory(t)
|
gitDir := testutils.CreateLocalGitDirectory(t)
|
||||||
test.SetGitRemote(t, gitDir, "newremote", "https://git.test.com/somerepo")
|
testutils.SetGitRemote(t, gitDir, "newremote", "https://git.test.com/somerepo")
|
||||||
test.CreateGitRemoteBranch(t, gitDir, "newbranch", "newremote")
|
testutils.CreateGitRemoteBranch(t, gitDir, "newbranch", "newremote")
|
||||||
dir := test.CreateLocalDirectory(t)
|
dir := testutils.CreateLocalDirectory(t)
|
||||||
defer os.RemoveAll(gitDir)
|
defer os.RemoveAll(gitDir)
|
||||||
defer os.RemoveAll(dir)
|
defer os.RemoveAll(dir)
|
||||||
|
|
||||||
@ -170,10 +170,10 @@ func TestGitGetCurrentBranch(t *testing.T) {
|
|||||||
var output string
|
var output string
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
gitDir := test.CreateLocalGitDirectory(t)
|
gitDir := testutils.CreateLocalGitDirectory(t)
|
||||||
test.SetGitRemote(t, gitDir, "newremote", "https://git.test.com/somerepo")
|
testutils.SetGitRemote(t, gitDir, "newremote", "https://git.test.com/somerepo")
|
||||||
test.CreateGitRemoteBranch(t, gitDir, "newbranch", "newremote")
|
testutils.CreateGitRemoteBranch(t, gitDir, "newbranch", "newremote")
|
||||||
dir := test.CreateLocalDirectory(t)
|
dir := testutils.CreateLocalDirectory(t)
|
||||||
defer os.RemoveAll(gitDir)
|
defer os.RemoveAll(gitDir)
|
||||||
defer os.RemoveAll(dir)
|
defer os.RemoveAll(dir)
|
||||||
|
|
||||||
@ -237,11 +237,11 @@ func TestGetAbsBuildContext(t *testing.T) {
|
|||||||
var output string
|
var output string
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
gitDir := test.CreateLocalGitDirectory(t)
|
gitDir := testutils.CreateLocalGitDirectory(t)
|
||||||
test.SetGitRemote(t, gitDir, "newremote", "https://git.test.com/somerepo")
|
testutils.SetGitRemote(t, gitDir, "newremote", "https://git.test.com/somerepo")
|
||||||
test.CreateGitRemoteBranch(t, gitDir, "newbranch", "newremote")
|
testutils.CreateGitRemoteBranch(t, gitDir, "newbranch", "newremote")
|
||||||
test.CreateSubdir(t, gitDir, "a/b")
|
testutils.CreateSubdir(t, gitDir, "a/b")
|
||||||
dir := test.CreateLocalDirectory(t)
|
dir := testutils.CreateLocalDirectory(t)
|
||||||
defer os.RemoveAll(gitDir)
|
defer os.RemoveAll(gitDir)
|
||||||
defer os.RemoveAll(dir)
|
defer os.RemoveAll(dir)
|
||||||
|
|
||||||
@ -275,8 +275,8 @@ func TestGetAbsBuildContext(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestInitBuildConfig(t *testing.T) {
|
func TestInitBuildConfig(t *testing.T) {
|
||||||
dir := test.CreateLocalGitDirectory(t)
|
dir := testutils.CreateLocalGitDirectory(t)
|
||||||
test.CreateSubdir(t, dir, "a/build")
|
testutils.CreateSubdir(t, dir, "a/build")
|
||||||
defer os.RemoveAll(dir)
|
defer os.RemoveAll(dir)
|
||||||
|
|
||||||
serviceName := "serviceA"
|
serviceName := "serviceA"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user