Merge pull request #72 from rosenhouse/move-echosvr
testing: move echosvr into testutils
This commit is contained in:
commit
b24225fc17
@ -16,7 +16,7 @@ import (
|
|||||||
var binaryPath string
|
var binaryPath string
|
||||||
|
|
||||||
var _ = SynchronizedBeforeSuite(func() []byte {
|
var _ = SynchronizedBeforeSuite(func() []byte {
|
||||||
binaryPath, err := gexec.Build("github.com/containernetworking/plugins/plugins/meta/portmap/echosvr")
|
binaryPath, err := gexec.Build("github.com/containernetworking/plugins/pkg/testutils/echosvr")
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
return []byte(binaryPath)
|
return []byte(binaryPath)
|
||||||
}, func(data []byte) {
|
}, func(data []byte) {
|
@ -9,5 +9,5 @@ import (
|
|||||||
|
|
||||||
func TestEchosvr(t *testing.T) {
|
func TestEchosvr(t *testing.T) {
|
||||||
RegisterFailHandler(Fail)
|
RegisterFailHandler(Fail)
|
||||||
RunSpecs(t, "Echosvr Suite")
|
RunSpecs(t, "Testutils Echosvr Suite")
|
||||||
}
|
}
|
@ -1,3 +1,9 @@
|
|||||||
|
// Echosvr is a simple TCP echo server
|
||||||
|
//
|
||||||
|
// It prints its listen address on stdout
|
||||||
|
// 127.0.0.1:xxxxx
|
||||||
|
// A test should wait for this line, parse it
|
||||||
|
// and may then attempt to connect.
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
@ -43,7 +43,7 @@ func TestPortmap(t *testing.T) {
|
|||||||
var echoServerBinaryPath string
|
var echoServerBinaryPath string
|
||||||
|
|
||||||
var _ = SynchronizedBeforeSuite(func() []byte {
|
var _ = SynchronizedBeforeSuite(func() []byte {
|
||||||
binaryPath, err := gexec.Build("github.com/containernetworking/plugins/plugins/meta/portmap/echosvr")
|
binaryPath, err := gexec.Build("github.com/containernetworking/plugins/pkg/testutils/echosvr")
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
return []byte(binaryPath)
|
return []byte(binaryPath)
|
||||||
}, func(data []byte) {
|
}, func(data []byte) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user