Skip to content

Commit

Permalink
feat(Filters & Firewall_Rules): Response changed from io.Read to Struct
Browse files Browse the repository at this point in the history
  • Loading branch information
DwitikrDash committed Jun 8, 2021
1 parent c3278b3 commit a04bdd8
Show file tree
Hide file tree
Showing 10 changed files with 2,622 additions and 2,644 deletions.
12 changes: 2 additions & 10 deletions dnsrecordbulkv1/dns_record_bulk_v1_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"strings"

"github.com/IBM/go-sdk-core/core"
"github.com/IBM/networking-go-sdk/dnsrecordbulkv1"
"github.com/IBM/networking-go-sdk/dnsrecordsv1"
"github.com/joho/godotenv"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/IBM/networking-go-sdk/dnsrecordbulkv1"
"github.com/IBM/networking-go-sdk/dnsrecordsv1"
)

const configFile = "../cis.env"
Expand Down Expand Up @@ -137,14 +137,6 @@ var _ = Describe(`DnsRecordBulkV1`, func() {
Expect(response).ToNot(BeNil())
Expect(result).ToNot(BeNil())
dnsOptions = dnsTestService.NewCreateDnsRecordOptions()
dnsOptions.SetName("host-55.test-example.com")
dnsOptions.SetType(dnsrecordsv1.CreateDnsRecordOptions_Type_Spf)
dnsOptions.SetContent("domain7.com")
result, response, err = dnsTestService.CreateDnsRecord(dnsOptions)
Expect(err).To(BeNil())
Expect(response).ToNot(BeNil())
Expect(result).ToNot(BeNil())
dnsOptions = dnsTestService.NewCreateDnsRecordOptions()
dnsOptions.SetName("host-10.test-example.com")
dnsOptions.SetType(dnsrecordsv1.CreateDnsRecordOptions_Type_Txt)
dnsOptions.SetContent("Test Text")
Expand Down
41 changes: 0 additions & 41 deletions dnsrecordsv1/dns_records_v1_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,47 +345,6 @@ var _ = Describe(`DNSRecordsV1`, func() {
Expect(delResult).ToNot(BeNil())
Expect(*result.Success).Should(BeTrue())
})
It(`create/delete/get dns Spf type records`, func() {
shouldSkipTest()
mode := CreateDnsRecordOptions_Type_Spf
options := testService.NewCreateDnsRecordOptions()
options.SetName("host-1.recordtest.com")
options.SetType(mode)
options.SetTTL(900)
options.SetContent("domain.com")
result, response, err := testService.CreateDnsRecord(options)
Expect(err).To(BeNil())
Expect(response).ToNot(BeNil())
Expect(result).ToNot(BeNil())

// get DNS Reord Options
getOption := testService.NewGetDnsRecordOptions(*result.Result.ID)
result, response, err = testService.GetDnsRecord(getOption)
Expect(err).To(BeNil())
Expect(response).ToNot(BeNil())
Expect(result).ToNot(BeNil())
Expect(*result.Success).Should(BeTrue())

updateOpt := testService.NewUpdateDnsRecordOptions(*result.Result.ID)
newModes := CreateDnsRecordOptions_Type_Txt
updateOpt.SetType(newModes)
updateOpt.SetName("host-1.recordtest.com")
options.SetTTL(100)
updateOpt.SetContent("Test Text")
result, response, err = testService.UpdateDnsRecord(updateOpt)
Expect(err).To(BeNil())
Expect(response).ToNot(BeNil())
Expect(result).ToNot(BeNil())
Expect(*result.Success).Should(BeTrue())

// delete Dns Record Options
deleteOpt := testService.NewDeleteDnsRecordOptions(*result.Result.ID)
delResult, response, err := testService.DeleteDnsRecord(deleteOpt)
Expect(err).To(BeNil())
Expect(response).ToNot(BeNil())
Expect(delResult).ToNot(BeNil())
Expect(*result.Success).Should(BeTrue())
})
It(`create/delete/get dns Srv type records`, func() {
shouldSkipTest()
mode := CreateDnsRecordOptions_Type_Srv
Expand Down
Loading

0 comments on commit a04bdd8

Please sign in to comment.