Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
d42d80c4
Commit
d42d80c4
authored
Feb 17, 2019
by
Sandeep Rajan
Committed by
Miek Gieben
Feb 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup by fmt and remove redundant type declarations (#2563)
parent
1fe66443
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
plugin/etcd/etcd.go
plugin/etcd/etcd.go
+1
-1
plugin/k8s_external/apex_test.go
plugin/k8s_external/apex_test.go
+1
-1
plugin/k8s_external/external_test.go
plugin/k8s_external/external_test.go
+1
-1
plugin/kubernetes/external_test.go
plugin/kubernetes/external_test.go
+4
-4
plugin/kubernetes/handler_test.go
plugin/kubernetes/handler_test.go
+2
-2
plugin/kubernetes/xfr_test.go
plugin/kubernetes/xfr_test.go
+2
-2
No files found.
plugin/etcd/etcd.go
View file @
d42d80c4
plugin/k8s_external/apex_test.go
View file @
d42d80c4
...
@@ -13,7 +13,7 @@ import (
...
@@ -13,7 +13,7 @@ import (
func
TestApex
(
t
*
testing
.
T
)
{
func
TestApex
(
t
*
testing
.
T
)
{
k
:=
kubernetes
.
New
([]
string
{
"cluster.local."
})
k
:=
kubernetes
.
New
([]
string
{
"cluster.local."
})
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
struct
{}
{}}
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
{}}
k
.
APIConn
=
&
external
{}
k
.
APIConn
=
&
external
{}
e
:=
New
()
e
:=
New
()
...
...
plugin/k8s_external/external_test.go
View file @
d42d80c4
...
@@ -17,7 +17,7 @@ import (
...
@@ -17,7 +17,7 @@ import (
func
TestExternal
(
t
*
testing
.
T
)
{
func
TestExternal
(
t
*
testing
.
T
)
{
k
:=
kubernetes
.
New
([]
string
{
"cluster.local."
})
k
:=
kubernetes
.
New
([]
string
{
"cluster.local."
})
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
struct
{}
{}}
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
{}}
k
.
APIConn
=
&
external
{}
k
.
APIConn
=
&
external
{}
e
:=
New
()
e
:=
New
()
...
...
plugin/kubernetes/external_test.go
View file @
d42d80c4
...
@@ -22,13 +22,13 @@ var extCases = []struct {
...
@@ -22,13 +22,13 @@ var extCases = []struct {
{
{
Qname
:
"svc1.testns.example.org."
,
Rcode
:
dns
.
RcodeSuccess
,
Qname
:
"svc1.testns.example.org."
,
Rcode
:
dns
.
RcodeSuccess
,
Msg
:
[]
msg
.
Service
{
Msg
:
[]
msg
.
Service
{
msg
.
Service
{
Host
:
"1.2.3.4"
,
Port
:
80
,
TTL
:
5
,
Key
:
"/c/org/example/testns/svc1"
},
{
Host
:
"1.2.3.4"
,
Port
:
80
,
TTL
:
5
,
Key
:
"/c/org/example/testns/svc1"
},
},
},
},
},
{
{
Qname
:
"svc6.testns.example.org."
,
Rcode
:
dns
.
RcodeSuccess
,
Qname
:
"svc6.testns.example.org."
,
Rcode
:
dns
.
RcodeSuccess
,
Msg
:
[]
msg
.
Service
{
Msg
:
[]
msg
.
Service
{
msg
.
Service
{
Host
:
"1:2::5"
,
Port
:
80
,
TTL
:
5
,
Key
:
"/c/org/example/testns/svc1"
},
{
Host
:
"1:2::5"
,
Port
:
80
,
TTL
:
5
,
Key
:
"/c/org/example/testns/svc1"
},
},
},
},
},
{
{
...
@@ -37,7 +37,7 @@ var extCases = []struct {
...
@@ -37,7 +37,7 @@ var extCases = []struct {
{
{
Qname
:
"_http._tcp.svc1.testns.example.com."
,
Rcode
:
dns
.
RcodeSuccess
,
Qname
:
"_http._tcp.svc1.testns.example.com."
,
Rcode
:
dns
.
RcodeSuccess
,
Msg
:
[]
msg
.
Service
{
Msg
:
[]
msg
.
Service
{
msg
.
Service
{
Host
:
"1.2.3.4"
,
Port
:
80
,
TTL
:
5
,
Key
:
"/c/org/example/testns/svc1"
},
{
Host
:
"1.2.3.4"
,
Port
:
80
,
TTL
:
5
,
Key
:
"/c/org/example/testns/svc1"
},
},
},
},
},
{
{
...
@@ -52,7 +52,7 @@ func TestExternal(t *testing.T) {
...
@@ -52,7 +52,7 @@ func TestExternal(t *testing.T) {
k
:=
New
([]
string
{
"cluster.local."
})
k
:=
New
([]
string
{
"cluster.local."
})
k
.
APIConn
=
&
external
{}
k
.
APIConn
=
&
external
{}
k
.
Next
=
test
.
NextHandler
(
dns
.
RcodeSuccess
,
nil
)
k
.
Next
=
test
.
NextHandler
(
dns
.
RcodeSuccess
,
nil
)
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
struct
{}
{}}
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
{}}
for
i
,
tc
:=
range
extCases
{
for
i
,
tc
:=
range
extCases
{
state
:=
testRequest
(
tc
.
Qname
)
state
:=
testRequest
(
tc
.
Qname
)
...
...
plugin/kubernetes/handler_test.go
View file @
d42d80c4
...
@@ -347,7 +347,7 @@ func TestServeDNS(t *testing.T) {
...
@@ -347,7 +347,7 @@ func TestServeDNS(t *testing.T) {
k
:=
New
([]
string
{
"cluster.local."
})
k
:=
New
([]
string
{
"cluster.local."
})
k
.
APIConn
=
&
APIConnServeTest
{}
k
.
APIConn
=
&
APIConnServeTest
{}
k
.
Next
=
test
.
NextHandler
(
dns
.
RcodeSuccess
,
nil
)
k
.
Next
=
test
.
NextHandler
(
dns
.
RcodeSuccess
,
nil
)
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
struct
{}
{}}
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
{}}
ctx
:=
context
.
TODO
()
ctx
:=
context
.
TODO
()
for
i
,
tc
:=
range
dnsTestCases
{
for
i
,
tc
:=
range
dnsTestCases
{
...
@@ -398,7 +398,7 @@ func TestNotSyncedServeDNS(t *testing.T) {
...
@@ -398,7 +398,7 @@ func TestNotSyncedServeDNS(t *testing.T) {
notSynced
:
true
,
notSynced
:
true
,
}
}
k
.
Next
=
test
.
NextHandler
(
dns
.
RcodeSuccess
,
nil
)
k
.
Next
=
test
.
NextHandler
(
dns
.
RcodeSuccess
,
nil
)
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
struct
{}
{}}
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
{}}
ctx
:=
context
.
TODO
()
ctx
:=
context
.
TODO
()
for
i
,
tc
:=
range
notSyncedTestCases
{
for
i
,
tc
:=
range
notSyncedTestCases
{
...
...
plugin/kubernetes/xfr_test.go
View file @
d42d80c4
...
@@ -15,7 +15,7 @@ func TestKubernetesXFR(t *testing.T) {
...
@@ -15,7 +15,7 @@ func TestKubernetesXFR(t *testing.T) {
k
:=
New
([]
string
{
"cluster.local."
})
k
:=
New
([]
string
{
"cluster.local."
})
k
.
APIConn
=
&
APIConnServeTest
{}
k
.
APIConn
=
&
APIConnServeTest
{}
k
.
TransferTo
=
[]
string
{
"10.240.0.1:53"
}
k
.
TransferTo
=
[]
string
{
"10.240.0.1:53"
}
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
struct
{}
{}}
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
{}}
ctx
:=
context
.
TODO
()
ctx
:=
context
.
TODO
()
w
:=
dnstest
.
NewMultiRecorder
(
&
test
.
ResponseWriter
{})
w
:=
dnstest
.
NewMultiRecorder
(
&
test
.
ResponseWriter
{})
...
@@ -103,7 +103,7 @@ func TestKubernetesXFRNotAllowed(t *testing.T) {
...
@@ -103,7 +103,7 @@ func TestKubernetesXFRNotAllowed(t *testing.T) {
k
:=
New
([]
string
{
"cluster.local."
})
k
:=
New
([]
string
{
"cluster.local."
})
k
.
APIConn
=
&
APIConnServeTest
{}
k
.
APIConn
=
&
APIConnServeTest
{}
k
.
TransferTo
=
[]
string
{
"1.2.3.4:53"
}
k
.
TransferTo
=
[]
string
{
"1.2.3.4:53"
}
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
struct
{}
{}}
k
.
Namespaces
=
map
[
string
]
struct
{}{
"testns"
:
{}}
ctx
:=
context
.
TODO
()
ctx
:=
context
.
TODO
()
w
:=
dnstest
.
NewMultiRecorder
(
&
test
.
ResponseWriter
{})
w
:=
dnstest
.
NewMultiRecorder
(
&
test
.
ResponseWriter
{})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment