package encryption_test

import (
	"flag"

	"github.com/cloudfoundry-incubator/bbs/encryption"

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

var _ = Describe("Encryption Flags", func() {
	var (
		flagSet         *flag.FlagSet
		encryptionFlags *encryption.EncryptionFlags
	)

	JustBeforeEach(func() {
		flagSet = flag.NewFlagSet("test", 2)
		encryptionFlags = encryption.AddEncryptionFlags(flagSet)
	})

	Describe("Validate", func() {
		var args []string

		BeforeEach(func() {
			args = []string{}
		})

		It("ensures there's at least one encryption key", func() {
			args = append(args, "-activeKeyLabel="+"label")
Example #2
0
package encryption_test

import (
	"flag"

	"github.com/cloudfoundry-incubator/bbs/encryption"

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

var _ = Describe("Encryption Flags", func() {
	var (
		flagSet         *flag.FlagSet
		encryptionFlags *encryption.EncryptionFlags
	)

	JustBeforeEach(func() {
		flagSet = flag.NewFlagSet("test", 2)
		encryptionFlags = encryption.AddEncryptionFlags(flagSet)
	})

	Describe("Validate", func() {
		var args []string

		BeforeEach(func() {
			args = []string{}
		})

		It("ensures there's at least one encryption key", func() {
			args = append(args, "-activeKeyLabel="+"label")