Merge pull request #87132 from yuxiaobo96/k8s-removeTODO

remove TODO in test/e2e/framework/providers/gce/ingress.go
This commit is contained in:
Kubernetes Prow Robot 2020-01-15 11:56:37 -08:00 committed by GitHub
commit 2da2c3b01b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 13 deletions

View File

@ -571,19 +571,8 @@ func (cont *IngressController) GetFirewallRuleName() string {
}
// GetFirewallRule returns the firewall used by the IngressController.
// 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 *IngressController) GetFirewallRule() *compute.Firewall {
fw, err := cont.GetFirewallRuleOrError()
framework.ExpectNoError(err)
return fw
}
// GetFirewallRuleOrError returns the firewall used by the IngressController.
// Returns an error if that fails.
// TODO: Rename this to GetFirewallRule when the above method with that name is renamed.
func (cont *IngressController) GetFirewallRuleOrError() (*compute.Firewall, error) {
func (cont *IngressController) GetFirewallRule() (*compute.Firewall, error) {
gceCloud := cont.Cloud.Provider.(*Provider).gceCloud
fwName := cont.GetFirewallRuleName()
return gceCloud.GetFirewall(fwName)

View File

@ -228,7 +228,7 @@ 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 fw, err := gceController.GetFirewallRuleOrError(); err == nil {
if fw, err := gceController.GetFirewallRule(); err == nil {
framework.Failf("unexpected nil error in getting firewall rule, expected firewall NotFound, got firewall: %v", fw)
}