"net"
	"runtime"
	"time"

	"github.com/ice-stuff/clique/acceptance/runner"
	"github.com/ice-stuff/clique/api"
	"github.com/ice-stuff/clique/config"
	"github.com/ice-stuff/clique/testhelpers"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Transferring with Iperf", func() {
	var (
		srcTPort, srcAPort, destTPort uint16
		srcClique, destClique         *runner.ClqProcess
		srcClient                     *api.Client
	)

	BeforeEach(func() {
		if !useIperf {
			Skip("This test can only run with Iperf.")
		}
		if runtime.GOOS != "linux" {
			Skip("This test can only run with Linux.")
		}

		var err error

		srcTPort = testhelpers.SelectPort(GinkgoParallelNode())
		srcAPort = testhelpers.SelectPort(GinkgoParallelNode())
Example #2
0
	"time"

	"github.com/ice-stuff/clique"
	"github.com/ice-stuff/clique/api"
	"github.com/ice-stuff/clique/api/fakes"
	"github.com/ice-stuff/clique/testhelpers"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Roundtrip", func() {
	var (
		port uint16

		fakeRegistry        *fakes.FakeRegistry
		fakeTransferCreator *fakes.FakeTransferCreator
		server              *api.Server

		client *api.Client
	)

	BeforeEach(func() {
		port = testhelpers.SelectPort(GinkgoParallelNode())

		fakeRegistry = new(fakes.FakeRegistry)
		fakeTransferCreator = new(fakes.FakeTransferCreator)
		server = api.NewServer(
			port,
			fakeRegistry,
			fakeTransferCreator,
		)
Example #3
0
	"net"
	"time"

	"github.com/ice-stuff/clique/acceptance/runner"
	"github.com/ice-stuff/clique/api"
	"github.com/ice-stuff/clique/config"
	"github.com/ice-stuff/clique/testhelpers"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Api", func() {
	var (
		srcTPort, srcAPort uint16
		srcClique          *runner.ClqProcess
		srcClient          *api.Client
	)

	BeforeEach(func() {
		var err error

		srcTPort = testhelpers.SelectPort(GinkgoParallelNode())
		srcAPort = testhelpers.SelectPort(GinkgoParallelNode())
		srcClique, err = startClique(config.Config{
			TransferPort: srcTPort,
			APIPort:      srcAPort,
		})
		Expect(err).NotTo(HaveOccurred())

		srcClient = api.NewClient(