Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
0f23756d
Commit
0f23756d
authored
Mar 31, 2018
by
nikhiljindal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Getting error from GetFirewallRule and checking it to fix multicluster ingress test
parent
61cddc9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
ingress_utils.go
test/e2e/framework/ingress_utils.go
+13
-3
ingress.go
test/e2e/network/ingress.go
+2
-2
No files found.
test/e2e/framework/ingress_utils.go
View file @
0f23756d
...
...
@@ -864,14 +864,24 @@ func (cont *GCEIngressController) GetFirewallRuleName() string {
}
// GetFirewallRule returns the firewall used by the GCEIngressController.
// Causes a fatal error incase of an error.
// TODO: Rename this to GetFirewallRuleOrDie and similarly rename all other
// methods here to be consistent with rest of the code in this repo.
func
(
cont
*
GCEIngressController
)
GetFirewallRule
()
*
compute
.
Firewall
{
gceCloud
:=
cont
.
Cloud
.
Provider
.
(
*
gcecloud
.
GCECloud
)
fwName
:=
cont
.
GetFirewallRuleName
()
fw
,
err
:=
gceCloud
.
GetFirewall
(
fwName
)
fw
,
err
:=
cont
.
GetFirewallRuleOrError
()
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
return
fw
}
// GetFirewallRule returns the firewall used by the GCEIngressController.
// Returns an error if that fails.
// TODO: Rename this to GetFirewallRule when the above method with that name is renamed.
func
(
cont
*
GCEIngressController
)
GetFirewallRuleOrError
()
(
*
compute
.
Firewall
,
error
)
{
gceCloud
:=
cont
.
Cloud
.
Provider
.
(
*
gcecloud
.
GCECloud
)
fwName
:=
cont
.
GetFirewallRuleName
()
return
gceCloud
.
GetFirewall
(
fwName
)
}
func
(
cont
*
GCEIngressController
)
deleteFirewallRule
(
del
bool
)
(
msg
string
)
{
fwList
:=
[]
compute
.
Firewall
{}
regex
:=
fmt
.
Sprintf
(
"%vfw-l7%v.*"
,
k8sPrefix
,
clusterDelimiter
)
...
...
test/e2e/network/ingress.go
View file @
0f23756d
...
...
@@ -386,8 +386,8 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
framework
.
Failf
(
"unexpected backend service, expected none, got: %v"
,
gceController
.
ListGlobalBackendServices
())
}
// Controller does not have a list command for firewall rule. We use get instead.
if
gceController
.
GetFirewallRule
()
!
=
nil
{
framework
.
Failf
(
"unexpected
firewall rule, expected none got: %v"
,
gceController
.
GetFirewallRule
()
)
if
fw
,
err
:=
gceController
.
GetFirewallRuleOrError
();
err
=
=
nil
{
framework
.
Failf
(
"unexpected
nil error in getting firewall rule, expected firewall NotFound, got firewall: %v"
,
fw
)
}
// TODO(nikhiljindal): Check the instance group annotation value and verify with a multizone cluster.
...
...
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