@@ -4,11 +4,9 @@ package layer3
44
55import (
66 "context"
7- "net/http"
87 "strings"
98 "testing"
109
11- "github.com/gophercloud/gophercloud/v2"
1210 "github.com/gophercloud/gophercloud/v2/internal/acceptance/clients"
1311 networking "github.com/gophercloud/gophercloud/v2/internal/acceptance/openstack/networking/v2"
1412 "github.com/gophercloud/gophercloud/v2/internal/acceptance/tools"
@@ -315,13 +313,7 @@ func TestLayer3RouterExternalGateways(t *testing.T) {
315313 }
316314
317315 updatedRouter , err := routers .AddExternalGateways (context .TODO (), client , router .ID , addOpts ).Extract ()
318- if err != nil {
319- // If we get a 404, the extension might not be fully functional
320- if gophercloud .ResponseCodeIs (err , http .StatusNotFound ) {
321- t .Skipf ("AddExternalGateways not supported: %v" , err )
322- }
323- th .AssertNoErr (t , err )
324- }
316+ th .AssertNoErr (t , err )
325317
326318 t .Logf ("Successfully added external gateways to router %s" , router .ID )
327319 tools .PrintResource (t , updatedRouter )
@@ -351,12 +343,7 @@ func TestLayer3RouterExternalGateways(t *testing.T) {
351343 }
352344
353345 updatedRouter , err = routers .UpdateExternalGateways (context .TODO (), client , router .ID , updateOpts ).Extract ()
354- if err != nil {
355- if gophercloud .ResponseCodeIs (err , http .StatusNotFound ) {
356- t .Skipf ("UpdateExternalGateways not supported: %v" , err )
357- }
358- th .AssertNoErr (t , err )
359- }
346+ th .AssertNoErr (t , err )
360347
361348 t .Logf ("Successfully updated external gateways of router %s" , router .ID )
362349 tools .PrintResource (t , updatedRouter )
@@ -384,12 +371,7 @@ func TestLayer3RouterExternalGateways(t *testing.T) {
384371 }
385372
386373 updatedRouter , err = routers .RemoveExternalGateways (context .TODO (), client , router .ID , removeOpts ).Extract ()
387- if err != nil {
388- if gophercloud .ResponseCodeIs (err , http .StatusNotFound ) {
389- t .Skipf ("RemoveExternalGateways not supported: %v" , err )
390- }
391- th .AssertNoErr (t , err )
392- }
374+ th .AssertNoErr (t , err )
393375
394376 t .Logf ("Successfully removed external gateways from router %s" , router .ID )
395377 tools .PrintResource (t , updatedRouter )
0 commit comments