Esempio n. 1
0
			BeforeEach(func() {
				dbInstanceDetails.VpcSecurityGroupIds = []string{"test-vpc-security-group-ids"}
				createDBInstanceInput.VpcSecurityGroupIds = aws.StringSlice([]string{"test-vpc-security-group-ids"})
			})

			It("does not return error", func() {
				err := rdsDBInstance.Create(dbInstanceIdentifier, dbInstanceDetails)
				Expect(err).ToNot(HaveOccurred())
			})
		})

		Context("when has Tags", func() {
			BeforeEach(func() {
				dbInstanceDetails.Tags = map[string]string{"Owner": "Cloud Foundry"}
				createDBInstanceInput.Tags = []*rds.Tag{
					&rds.Tag{Key: aws.String("Owner"), Value: aws.String("Cloud Foundry")},
				}
			})

			It("does not return error", func() {
				err := rdsDBInstance.Create(dbInstanceIdentifier, dbInstanceDetails)
				Expect(err).ToNot(HaveOccurred())
			})
		})

		Context("when creating the DB Instance fails", func() {
			BeforeEach(func() {
				createDBInstanceError = errors.New("operation failed")
			})

			It("returns the proper error", func() {