Ejemplo n.º 1
0
	"math/rand"
	"strings"

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

	"github.com/rosenhouse/proctor/controller"
	"github.com/rosenhouse/proctor/mocks"
)

var _ = Describe("DescribeClassroom", func() {
	var (
		c           *controller.Controller
		atlasClient *mocks.AtlasClient
		awsClient   *mocks.AWSClient
		cliLogger   *mocks.CLILogger

		classroomName string
		prefixedName  string
	)

	BeforeEach(func() {
		atlasClient = &mocks.AtlasClient{}
		awsClient = &mocks.AWSClient{}
		cliLogger = &mocks.CLILogger{}

		c = &controller.Controller{
			AWSClient: awsClient,
			Log:       cliLogger,
		}
Ejemplo n.º 2
0
	"github.com/hashicorp/go-multierror"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	"github.com/rosenhouse/proctor/controller"
	"github.com/rosenhouse/proctor/mocks"
	"github.com/rosenhouse/proctor/shell"
)

var _ = Describe("RunOnVMs", func() {
	var (
		c              *controller.Controller
		atlasClient    *mocks.AtlasClient
		awsClient      *mocks.AWSClient
		cliLogger      *mocks.CLILogger
		parallelRunner *mocks.ParallelRunner
		webClient      *mocks.WebClient

		classroomName string
		prefixedName  string
	)

	BeforeEach(func() {
		atlasClient = &mocks.AtlasClient{}
		awsClient = &mocks.AWSClient{}
		cliLogger = &mocks.CLILogger{}
		parallelRunner = &mocks.ParallelRunner{}
		webClient = &mocks.WebClient{}

		c = &controller.Controller{
			AWSClient:      awsClient,
Ejemplo n.º 3
0
	"fmt"
	"math/rand"

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

	"github.com/rosenhouse/proctor/controller"
	"github.com/rosenhouse/proctor/mocks"
)

var _ = Describe("CreateClassroom", func() {
	var (
		c           *controller.Controller
		atlasClient *mocks.AtlasClient
		awsClient   *mocks.AWSClient
		cliLogger   *mocks.CLILogger

		classroomName string
		prefixedName  string
	)

	BeforeEach(func() {
		atlasClient = &mocks.AtlasClient{}
		atlasClient.GetLatestAMIsCall.Returns.AMIMap = map[string]string{
			"some-region": "some-ami",
		}
		awsClient = &mocks.AWSClient{}
		cliLogger = &mocks.CLILogger{}

		c = &controller.Controller{
			AtlasClient: atlasClient,
Ejemplo n.º 4
0
	"fmt"
	"math/rand"

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

	"github.com/rosenhouse/proctor/controller"
	"github.com/rosenhouse/proctor/mocks"
)

var _ = Describe("DestroyClassroom", func() {
	var (
		c           *controller.Controller
		atlasClient *mocks.AtlasClient
		awsClient   *mocks.AWSClient
		cliLogger   *mocks.CLILogger

		classroomName string
		prefixedName  string
	)

	BeforeEach(func() {
		atlasClient = &mocks.AtlasClient{}
		awsClient = &mocks.AWSClient{}
		cliLogger = &mocks.CLILogger{}

		c = &controller.Controller{
			AWSClient: awsClient,
			Log:       cliLogger,
		}
Ejemplo n.º 5
0
	"fmt"
	"math/rand"

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

	"github.com/rosenhouse/proctor/controller"
	"github.com/rosenhouse/proctor/mocks"
)

var _ = Describe("ListClassrooms", func() {
	var (
		c           *controller.Controller
		atlasClient *mocks.AtlasClient
		awsClient   *mocks.AWSClient
		cliLogger   *mocks.CLILogger

		classroomName string
		prefixedName  string
	)

	BeforeEach(func() {
		atlasClient = &mocks.AtlasClient{}
		awsClient = &mocks.AWSClient{}
		cliLogger = &mocks.CLILogger{}

		c = &controller.Controller{
			AWSClient: awsClient,
			Log:       cliLogger,
		}