Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5fa68ea

Browse files
committed
tests: Skip bgpvpn tests if extension missing
We also fix some typos in test names. Signed-off-by: Stephen Finucane <[email protected]> (cherry picked from commit 13997f3)
1 parent f1e827b commit 5fa68ea

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

internal/acceptance/openstack/networking/v2/extensions/bgpvpns/bgpvpns_test.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ func TestBGPVPNCRUD(t *testing.T) {
2020
client, err := clients.NewNetworkV2Client()
2121
th.AssertNoErr(t, err)
2222

23+
// Skip these tests if we don't have the required extension
24+
networking.RequireNeutronExtension(t, client, "bgpvpn")
25+
2326
// Create a BGP VPN
2427
bgpVpnCreated, err := CreateBGPVPN(t, client)
2528
th.AssertNoErr(t, err)
@@ -60,12 +63,15 @@ func TestBGPVPNCRUD(t *testing.T) {
6063
t.Logf("BGP VPN %s deleted", bgpVpnUpdated.Name)
6164
}
6265

63-
func TestBGPVPNNetworkAssociationCRD(t *testing.T) {
66+
func TestBGPVPNNetworkAssociationCRUD(t *testing.T) {
6467
clients.RequireAdmin(t)
6568

6669
client, err := clients.NewNetworkV2Client()
6770
th.AssertNoErr(t, err)
6871

72+
// Skip these tests if we don't have the required extension
73+
networking.RequireNeutronExtension(t, client, "bgpvpn")
74+
6975
// Create a BGP VPN
7076
bgpVpnCreated, err := CreateBGPVPN(t, client)
7177
th.AssertNoErr(t, err)
@@ -117,6 +123,9 @@ func TestBGPVPNRouterAssociationCRUD(t *testing.T) {
117123
client, err := clients.NewNetworkV2Client()
118124
th.AssertNoErr(t, err)
119125

126+
// Skip these tests if we don't have the required extension
127+
networking.RequireNeutronExtension(t, client, "bgpvpn")
128+
120129
// Create a BGP VPN
121130
bgpVpnCreated, err := CreateBGPVPN(t, client)
122131
th.AssertNoErr(t, err)
@@ -182,6 +191,9 @@ func TestBGPVPNPortAssociationCRUD(t *testing.T) {
182191
client, err := clients.NewNetworkV2Client()
183192
th.AssertNoErr(t, err)
184193

194+
// Skip these tests if we don't have the required extension
195+
networking.RequireNeutronExtension(t, client, "bgpvpn")
196+
185197
// Create a BGP VPN
186198
bgpVpnCreated, err := CreateBGPVPN(t, client)
187199
th.AssertNoErr(t, err)

internal/acceptance/openstack/networking/v2/extensions/dns/dns_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ func TestDNSPortCRUDL(t *testing.T) {
141141
th.AssertDeepEquals(t, newPort, getNewPort)
142142
}
143143

144-
func TestDNSFloatingIPCRDL(t *testing.T) {
145-
t.Skip("Skipping TestDNSFloatingIPCRDL for now, as it doesn't work with ML2/OVN.")
144+
func TestDNSFloatingIPCRUD(t *testing.T) {
145+
t.Skip("Skipping TestDNSFloatingIPCRUD for now, as it doesn't work with ML2/OVN.")
146146
clients.RequireAdmin(t)
147147

148148
client, err := clients.NewNetworkV2Client()

internal/acceptance/openstack/networking/v2/extensions/mtu/mtu_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
th "github.com/gophercloud/gophercloud/v2/testhelper"
1717
)
1818

19-
func TestMTUNetworkCRUDL(t *testing.T) {
19+
func TestMTUNetworkCRUD(t *testing.T) {
2020
clients.RequireAdmin(t)
2121

2222
client, err := clients.NewNetworkV2Client()

0 commit comments

Comments
 (0)