Skip to content

Commit

Permalink
Merge pull request #73 from vinyldns/gofmt
Browse files Browse the repository at this point in the history
make 'gofmt' happier
  • Loading branch information
mdb authored Mar 29, 2020
2 parents fe8a3d8 + be85047 commit 88487d4
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 46 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ SOURCE?=./...
VINYLDNS_REPO=github.com/vinyldns/vinyldns
VINYLDNS_VERSION=0.9.3

all: test build integration stop-api validate-version install
all: check-fmt test build integration stop-api validate-version install

fmt:
gofmt -s -w vinyldns

check-fmt:
test -z "$(shell gofmt -s -l vinyldns | tee /dev/stderr)"

test:
go vet $(SOURCE)
GO111MODULE=on go test $(SOURCE) -cover
Expand Down
6 changes: 3 additions & 3 deletions vinyldns/batch_changes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestBatchRecordChanges(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/batchrecordchanges",
code: 200,
body: batchChangesJSON,
Expand Down Expand Up @@ -98,7 +98,7 @@ func TestBatchRecordChange(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/batchrecordchanges/123",
code: 200,
body: batchChangeJSON,
Expand Down Expand Up @@ -128,7 +128,7 @@ func TestBatchRecordChangeCreate(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/batchrecordchanges",
code: 200,
body: batchChangeCreateJSON,
Expand Down
20 changes: 10 additions & 10 deletions vinyldns/groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestGroupCreate(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/groups",
code: 200,
body: groupJSON,
Expand Down Expand Up @@ -61,7 +61,7 @@ func TestGroupUpdate(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/groups/123",
code: 200,
body: groupJSON,
Expand Down Expand Up @@ -99,7 +99,7 @@ func TestGroupDelete(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/groups/123",
code: 200,
body: groupJSON,
Expand Down Expand Up @@ -130,7 +130,7 @@ func TestGroups(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/groups",
code: 200,
body: groupsJSON,
Expand Down Expand Up @@ -176,12 +176,12 @@ func TestGroupsListAll(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/groups?maxItems=1",
code: 200,
body: groupsListJSON1,
},
testToolsConfig{
{
endpoint: "http://host.com/groups?startFrom=2&maxItems=1",
code: 200,
body: groupsListJSON2,
Expand Down Expand Up @@ -222,7 +222,7 @@ func TestGroup(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/groups/123",
code: 200,
body: groupJSON,
Expand Down Expand Up @@ -253,7 +253,7 @@ func TestGroupAdmins(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/groups/123/admins",
code: 200,
body: groupAdminsJSON,
Expand All @@ -280,7 +280,7 @@ func TestGroupMembers(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/groups/123/members",
code: 200,
body: groupMembersJSON,
Expand All @@ -307,7 +307,7 @@ func TestGroupActivity(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/groups/123/activity",
code: 200,
body: groupActivityJSON,
Expand Down
28 changes: 14 additions & 14 deletions vinyldns/recordsets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestRecordSets(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsets",
code: 200,
body: recordSetsJSON,
Expand Down Expand Up @@ -59,12 +59,12 @@ func TestRecordSetsListAll(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsets?maxItems=1",
code: 200,
body: recordSetsListJSON1,
},
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsets?startFrom=2&maxItems=1",
code: 200,
body: recordSetsListJSON2,
Expand Down Expand Up @@ -105,7 +105,7 @@ func TestRecordSetsListAllWhenNoneExist(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsets",
code: 200,
body: recordSetsListNoneJSON,
Expand Down Expand Up @@ -139,12 +139,12 @@ func TestRecordSetCollector(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsets?maxItems=3",
code: 200,
body: recordSetsJSON,
},
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsets?maxItems=1",
code: 200,
body: recordSetsJSON,
Expand Down Expand Up @@ -193,7 +193,7 @@ func TestRecordSet(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsets/456",
code: 200,
body: recordSetJSON,
Expand Down Expand Up @@ -248,7 +248,7 @@ func TestRecordSetCreate(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsets",
code: 200,
body: recordSetUpdateResponseJSON,
Expand Down Expand Up @@ -292,7 +292,7 @@ func TestRecordSetUpdate(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsets/456",
code: 202,
body: recordSetUpdateResponseJSON,
Expand Down Expand Up @@ -337,7 +337,7 @@ func TestRecordSetDelete(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsets/456",
code: 202,
body: recordSetUpdateResponseJSON,
Expand Down Expand Up @@ -371,7 +371,7 @@ func TestRecordSetChangessListAllWhenNoneExist(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsetchanges",
code: 200,
body: recordSetChangesListNoneJSON,
Expand Down Expand Up @@ -409,12 +409,12 @@ func TestRecordSetChangesListAll(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsetchanges?maxItems=1",
code: 200,
body: recordSetChangesJSON1,
},
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsetchanges?startFrom=2&maxItems=1",
code: 200,
body: recordSetChangesJSON2,
Expand Down Expand Up @@ -455,7 +455,7 @@ func TestRecordSetChange(t *testing.T) {
t.Error(err)
}
server, client := testTools([]testToolsConfig{
testToolsConfig{
{
endpoint: "http://host.com/zones/123/recordsets/456/changes/789",
code: 200,
body: recordSetChangeJSON,
Expand Down
Loading

0 comments on commit 88487d4

Please sign in to comment.