Exemplo n.º 1
0
import (
	"fmt"

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

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

var _ = Describe("Logging", func() {
	var (
		tPortA, tPortB uint16
		procA, procB   *runner.ClqProcess
		hosts          []string
	)

	BeforeEach(func() {
		var err error

		tPortA = testhelpers.SelectPort(GinkgoParallelNode())
		tPortB = testhelpers.SelectPort(GinkgoParallelNode())
		hosts = []string{
			fmt.Sprintf("127.0.0.1:%d", tPortA),
			fmt.Sprintf("127.0.0.1:%d", tPortB),
		}

		procA, err = startClique(config.Config{
			TransferPort:     tPortA,
Exemplo n.º 2
0
	"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())