Ejemplo n.º 1
0
package dns_domain

import (
	"time"

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

	softlayer "github.com/maximilien/softlayer-go/softlayer"
	testhelpers "github.com/maximilien/softlayer-go/test_helpers"
)

var _ = Describe("SoftLayer DNS domains", func() {
	var (
		err              error
		dnsDomainService softlayer.SoftLayer_Dns_Domain_Service
	)

	BeforeEach(func() {
		dnsDomainService, err = testhelpers.CreateDnsDomainService()
		Expect(err).ToNot(HaveOccurred())

		testhelpers.TIMEOUT = 30 * time.Second
		testhelpers.POLLING_INTERVAL = 10 * time.Second
	})

	Context("SoftLayer_Dns_Domain", func() {
		It("creates a DNS Domain, update it, and delete it", func() {
			createdDnsDomain := testhelpers.CreateTestDnsDomain("test.domain.name")

			testhelpers.WaitForCreatedDnsDomainToBePresent(createdDnsDomain.Id)
package dns_domain

import (
	"time"

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

	softlayer "github.com/maximilien/softlayer-go/softlayer"
	testhelpers "github.com/maximilien/softlayer-go/test_helpers"
)

var _ = Describe("SoftLayer DNS domains", func() {
	var (
		err              error
		dnsDomainService softlayer.SoftLayer_Dns_Domain_Service
	)

	BeforeEach(func() {
		dnsDomainService, err = testhelpers.CreateDnsDomainService()
		Expect(err).ToNot(HaveOccurred())

		testhelpers.TIMEOUT = 30 * time.Second
		testhelpers.POLLING_INTERVAL = 10 * time.Second
	})

	Context("SoftLayer_Dns_Domain", func() {
		It("creates a DNS Domain, update it, and delete it", func() {
			createdDnsDomain := testhelpers.CreateTestDnsDomain("test.domain.name")

			testhelpers.WaitForCreatedDnsDomainToBePresent(createdDnsDomain.Id)
package dns_resource_record

import (
	"time"

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

	softlayer "github.com/maximilien/softlayer-go/softlayer"
	testhelpers "github.com/maximilien/softlayer-go/test_helpers"
)

var _ = Describe("SoftLayer DNS Resource Records", func() {
	var (
		err                            error
		dnsDomainResourceRecordService softlayer.SoftLayer_Dns_Domain_ResourceRecord_Service
		dnsDomainService               softlayer.SoftLayer_Dns_Domain_Service
	)

	BeforeEach(func() {
		dnsDomainResourceRecordService, err = testhelpers.CreateDnsDomainResourceRecordService()
		Expect(err).ToNot(HaveOccurred())

		dnsDomainService, err = testhelpers.CreateDnsDomainService()
		Expect(err).ToNot(HaveOccurred())

		testhelpers.TIMEOUT = 30 * time.Second
		testhelpers.POLLING_INTERVAL = 10 * time.Second
	})

	Context("SoftLayer_Dns_Domain_ResourceRecord", func() {
	"os"

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

	slclientfakes "github.com/maximilien/softlayer-go/client/fakes"
	datatypes "github.com/maximilien/softlayer-go/data_types"
	softlayer "github.com/maximilien/softlayer-go/softlayer"
	testhelpers "github.com/maximilien/softlayer-go/test_helpers"
)

var _ = Describe("SoftLayer_Dns_Domain", func() {
	var (
		username, apiKey string

		fakeClient *slclientfakes.FakeSoftLayerClient

		dnsDomainService softlayer.SoftLayer_Dns_Domain_Service
		err              error
	)

	BeforeEach(func() {
		username = os.Getenv("SL_USERNAME")
		Expect(username).NotTo(Equal(""))

		apiKey = os.Getenv("SL_API_KEY")
		Expect(apiKey).NotTo(Equal(""))

		fakeClient = slclientfakes.NewFakeSoftLayerClient(username, apiKey)
		Expect(fakeClient).NotTo(BeNil())

		dnsDomainService, err = fakeClient.GetSoftLayer_Dns_Domain_Service()
	"os"

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

	slclientfakes "github.com/maximilien/softlayer-go/client/fakes"
	datatypes "github.com/maximilien/softlayer-go/data_types"
	softlayer "github.com/maximilien/softlayer-go/softlayer"
	testhelpers "github.com/maximilien/softlayer-go/test_helpers"
)

var _ = Describe("SoftLayer_Dns_Domain", func() {
	var (
		username, apiKey string

		fakeClient *slclientfakes.FakeSoftLayerClient

		dnsDomainService softlayer.SoftLayer_Dns_Domain_Service
		err              error
	)

	BeforeEach(func() {
		username = os.Getenv("SL_USERNAME")
		Expect(username).NotTo(Equal(""))

		apiKey = os.Getenv("SL_API_KEY")
		Expect(apiKey).NotTo(Equal(""))

		fakeClient = slclientfakes.NewFakeSoftLayerClient(username, apiKey)
		Expect(fakeClient).NotTo(BeNil())

		dnsDomainService, err = fakeClient.GetSoftLayer_Dns_Domain_Service()