Skip to content

Commit ed44370

Browse files
authored
Merge pull request #13 from ymartin-ovh/testfix
Added missing Nameservers details in testGetSubnetByIDOutputExpected
2 parents a93e9ab + 85f25ad commit ed44370

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

controllers/subnets/subnets_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ var testGetSubnetByIDOutputExpected = Subnet{
5252
Mask: 24,
5353
SectionID: 1,
5454
MasterSubnetID: 2,
55+
Nameservers: map[string]interface{}{
56+
"id": "0",
57+
"name": "mynameserver.example.com",
58+
"namesrv1": "1.2.3.4",
59+
"description": "a nameserver description",
60+
"permissions": "1",
61+
},
5562
}
5663

5764
const testGetSubnetByIDOutputJSON = `
@@ -82,7 +89,7 @@ const testGetSubnetByIDOutputJSON = `
8289
"name": "mynameserver.example.com",
8390
"namesrv1": "1.2.3.4",
8491
"description": "a nameserver description",
85-
"permissions": 1
92+
"permissions": "1"
8693
},
8794
"scanAgent": null,
8895
"isFolder": "0",
@@ -534,7 +541,7 @@ func TestCreateSubnet(t *testing.T) {
534541
}
535542
}
536543

537-
func TestCreateFirstFreeSubnet(t *testing.T){
544+
func TestCreateFirstFreeSubnet(t *testing.T) {
538545
ts := httpCreatedTestServer(testCreateFirstFreeSubnetOutputJSON)
539546
defer ts.Close()
540547
sess := fullSessionConfig()

0 commit comments

Comments
 (0)