Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
kmoe committed Feb 23, 2021
1 parent 29b19fd commit 8e697e0
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 25 deletions.
51 changes: 26 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,53 +13,54 @@ on:
- 'CHANGELOG.md'
- 'website/*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# build:
# name: Build
# runs-on: ubuntu-latest
# timeout-minutes: 5
# steps:

- name: Set up Go
uses: actions/[email protected]
with:
go-version: '1.15'
id: go
# - name: Set up Go
# uses: actions/[email protected]
# with:
# go-version: '1.15'
# id: go

- name: Check out code into the Go module directory
uses: actions/[email protected]
# - name: Check out code into the Go module directory
# uses: actions/[email protected]

- name: Go fmt
run: |
make fmt
# - name: Go fmt
# run: |
# make fmt

- name: Go vet
run: |
make vet
# - name: Go vet
# run: |
# make vet

- name: Build
run: |
go build -v .
# - name: Build
# run: |
# go build -v .


# run acceptance tests in a matrix with Terraform core versions
test:
name: Matrix Test
needs: build
# needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
terraform:
- '0.12.30'
- '0.13.6'
- '0.14.5'
# - '0.13.6'
# - '0.14.5'

steps:

- name: Set up Go
uses: actions/[email protected]
with:
go-version: '1.15'
go-version: '1.16'
id: go

- name: Check out code into the Go module directory
Expand Down
7 changes: 7 additions & 0 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,9 @@ func resourceDnsRead(d *schema.ResourceData, meta interface{}, rrType uint16) ([
msg := new(dns.Msg)
msg.SetQuestion(fqdn, rrType)

fmt.Println("EXCHANGING DNS MESSAGE:")
fmt.Println(msg)

r, err := exchange(msg, true, meta)
if err != nil {
return nil, fmt.Errorf("Error querying DNS record: %s", err)
Expand All @@ -597,6 +600,10 @@ func resourceDnsRead(d *schema.ResourceData, meta interface{}, rrType uint16) ([
if rrType == dns.TypeNS {
return r.Ns, nil
}

fmt.Println("RECEIVED RESPONSE:")
fmt.Println(r)

return r.Answer, nil
} else {
return nil, fmt.Errorf("update server is not set")
Expand Down

0 comments on commit 8e697e0

Please sign in to comment.