Skip to content

Commit

Permalink
Merge branch 'pr/204'
Browse files Browse the repository at this point in the history
* pr/204:
  Fix tests
  More detailed output from `import --dry-run`
  • Loading branch information
barnybug committed Oct 25, 2016
2 parents ad53a64 + cd7915c commit 345952c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,16 @@ func importBind(args importArgs) {
} else {
fmt.Println("Dry-run, changes that would be made:")
for _, addition := range additions {
rr := addition.ResourceRecordSet
fmt.Printf("+ %s %s\n", *rr.Name, *rr.Type)
rrs := ConvertRRSetToBind(addition.ResourceRecordSet)
for _, rr := range rrs {
fmt.Printf("+ %s\n", rr.String())
}
}
for _, deletion := range deletions {
rr := deletion.ResourceRecordSet
fmt.Printf("- %s %s\n", *rr.Name, *rr.Type)
rrs := ConvertRRSetToBind(deletion.ResourceRecordSet)
for _, rr := range rrs {
fmt.Printf("- %s\n", rr.String())
}
}
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions internal/features/import.feature
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ Feature: import
When I run "cli53 import --file tests/replace1.txt $domain"
And I run "cli53 import --replace --file tests/replace2.txt --dry-run $domain"
Then the output contains "Dry-run"
And the output contains "+ mail.$domain. A"
And the output contains "- mail.$domain. A"
And the output contains "+ mail.$domain. 86400 IN A 10.0.0.4"
And the output contains "- mail.$domain. 86400 IN A 10.0.0.2"

Scenario: I can import dry-run (no changes)
Given I have a domain "$domain"
Expand Down

0 comments on commit 345952c

Please sign in to comment.