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
5f55cd6d
Commit
5f55cd6d
authored
Oct 27, 2016
by
Chris O'Haver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update k8s integration tests
parent
48e19092
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
test/kubernetes_test.go
test/kubernetes_test.go
+24
-24
No files found.
test/kubernetes_test.go
View file @
5f55cd6d
...
...
@@ -19,22 +19,22 @@ var testdataLookupA = []struct {
ARecordCount
int
}{
// Matching queries
{
"mynginx.demo.coredns.local."
,
1
,
1
},
// One A record, should exist
{
"mynginx.demo.
svc.
coredns.local."
,
1
,
1
},
// One A record, should exist
// Failure queries
{
"mynginx.test.coredns.local."
,
0
,
0
},
// One A record, is not exposed
{
"someservicethatdoesnotexist.demo.coredns.local."
,
0
,
0
},
// Record does not exist
{
"mynginx.test.
svc.
coredns.local."
,
0
,
0
},
// One A record, is not exposed
{
"someservicethatdoesnotexist.demo.
svc.
coredns.local."
,
0
,
0
},
// Record does not exist
// Namespace wildcards
{
"mynginx.*.coredns.local."
,
1
,
1
},
// One A record, via wildcard namespace
{
"mynginx.any.coredns.local."
,
1
,
1
},
// One A record, via wildcard namespace
{
"someservicethatdoesnotexist.*.coredns.local."
,
0
,
0
},
// Record does not exist with wildcard for namespace
{
"someservicethatdoesnotexist.any.coredns.local."
,
0
,
0
},
// Record does not exist with wildcard for namespace
{
"*.demo.coredns.local."
,
2
,
2
},
// Two A records, via wildcard
{
"any.demo.coredns.local."
,
2
,
2
},
// Two A records, via wildcard
{
"*.test.coredns.local."
,
0
,
0
},
// Two A record, via wildcard that is not exposed
{
"any.test.coredns.local."
,
0
,
0
},
// Two A record, via wildcard that is not exposed
{
"*.*.coredns.local."
,
2
,
2
},
// Two A records, via namespace and service wildcard
{
"mynginx.*.
svc.
coredns.local."
,
1
,
1
},
// One A record, via wildcard namespace
{
"mynginx.any.
svc.
coredns.local."
,
1
,
1
},
// One A record, via wildcard namespace
{
"someservicethatdoesnotexist.*.
svc.
coredns.local."
,
0
,
0
},
// Record does not exist with wildcard for namespace
{
"someservicethatdoesnotexist.any.
svc.
coredns.local."
,
0
,
0
},
// Record does not exist with wildcard for namespace
{
"*.demo.
svc.
coredns.local."
,
2
,
2
},
// Two A records, via wildcard
{
"any.demo.
svc.
coredns.local."
,
2
,
2
},
// Two A records, via wildcard
{
"*.test.
svc.
coredns.local."
,
0
,
0
},
// Two A record, via wildcard that is not exposed
{
"any.test.
svc.
coredns.local."
,
0
,
0
},
// Two A record, via wildcard that is not exposed
{
"*.*.
svc.
coredns.local."
,
2
,
2
},
// Two A records, via namespace and service wildcard
}
// Test data for SRV records
...
...
@@ -45,22 +45,22 @@ var testdataLookupSRV = []struct {
SRVRecordCount
int
}{
// Matching queries
{
"mynginx.demo.coredns.local."
,
1
,
1
},
// One SRV record, should exist
{
"mynginx.demo.
svc.
coredns.local."
,
1
,
1
},
// One SRV record, should exist
// Failure queries
{
"mynginx.test.coredns.local."
,
0
,
0
},
// One SRV record, is not exposed
{
"someservicethatdoesnotexist.demo.coredns.local."
,
0
,
0
},
// Record does not exist
{
"mynginx.test.
svc.
coredns.local."
,
0
,
0
},
// One SRV record, is not exposed
{
"someservicethatdoesnotexist.demo.
svc.
coredns.local."
,
0
,
0
},
// Record does not exist
// Namespace wildcards
{
"mynginx.*.coredns.local."
,
1
,
1
},
// One SRV record, via wildcard namespace
{
"mynginx.any.coredns.local."
,
1
,
1
},
// One SRV record, via wildcard namespace
{
"someservicethatdoesnotexist.*.coredns.local."
,
0
,
0
},
// Record does not exist with wildcard for namespace
{
"someservicethatdoesnotexist.any.coredns.local."
,
0
,
0
},
// Record does not exist with wildcard for namespace
{
"*.demo.coredns.local."
,
2
,
2
},
// Two (mynginx, webserver) SRV record, via wildcard
{
"any.demo.coredns.local."
,
2
,
2
},
// Two (mynginx, webserver) SRV record, via wildcard
{
"*.test.coredns.local."
,
0
,
0
},
// One SRV record, via wildcard that is not exposed
{
"any.test.coredns.local."
,
0
,
0
},
// One SRV record, via wildcard that is not exposed
{
"*.*.coredns.local."
,
2
,
2
},
// Two SRV record, via namespace and service wildcard
{
"mynginx.*.
svc.
coredns.local."
,
1
,
1
},
// One SRV record, via wildcard namespace
{
"mynginx.any.
svc.
coredns.local."
,
1
,
1
},
// One SRV record, via wildcard namespace
{
"someservicethatdoesnotexist.*.
svc.
coredns.local."
,
0
,
0
},
// Record does not exist with wildcard for namespace
{
"someservicethatdoesnotexist.any.
svc.
coredns.local."
,
0
,
0
},
// Record does not exist with wildcard for namespace
{
"*.demo.
svc.
coredns.local."
,
2
,
2
},
// Two (mynginx, webserver) SRV record, via wildcard
{
"any.demo.
svc.
coredns.local."
,
2
,
2
},
// Two (mynginx, webserver) SRV record, via wildcard
{
"*.test.
svc.
coredns.local."
,
0
,
0
},
// One SRV record, via wildcard that is not exposed
{
"any.test.
svc.
coredns.local."
,
0
,
0
},
// One SRV record, via wildcard that is not exposed
{
"*.*.
svc.
coredns.local."
,
2
,
2
},
// Two SRV record, via namespace and service wildcard
}
func
TestKubernetesIntegration
(
t
*
testing
.
T
)
{
...
...
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