Update test utilities & build file
This commit is contained in:
@@ -717,9 +717,10 @@ func (cont *GCEIngressController) Init() {
|
||||
// invoking deleteStaticIPs.
|
||||
func (cont *GCEIngressController) CreateStaticIP(name string) string {
|
||||
gceCloud := cont.Cloud.Provider.(*gcecloud.GCECloud)
|
||||
ip, err := gceCloud.ReserveGlobalStaticIP(name, "")
|
||||
addr := &compute.Address{Name: name}
|
||||
ip, err := gceCloud.ReserveGlobalAddress(addr)
|
||||
if err != nil {
|
||||
if delErr := gceCloud.DeleteGlobalStaticIP(name); delErr != nil {
|
||||
if delErr := gceCloud.DeleteGlobalAddress(name); delErr != nil {
|
||||
if cont.isHTTPErrorCode(delErr, http.StatusNotFound) {
|
||||
Logf("Static ip with name %v was not allocated, nothing to delete", name)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user