Skip to content

Commit 66e624f

Browse files
authored
Fix network peering test names (#749)
1 parent 067d8af commit 66e624f

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

test/e2e/actions/networkpeer/azure.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
)
1010

1111
const AzureResourceGroupName = "atlas-operator-test"
12+
const AzureVPCName = "test-vnet"
1213

1314
/*
1415
For network peering to work with Azure, it's necessary to fulfill the requirements described in the documentation. https://www.mongodb.com/docs/atlas/reference/api/vpc-create-peering-connection/#request-path-parameters

test/e2e/actions/networkpeer/gcp.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import (
88
"google.golang.org/api/compute/v1"
99
)
1010

11+
const GCPVPCName = "network-peering-gcp-1-vpc"
12+
1113
func CreateVPCForGCP(gcpProjectID string, vnetName string) error {
1214
computeService, err := compute.NewService(context.Background())
1315
if err != nil {

test/e2e/network_peering_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ var _ = Describe("NetworkPeering", Label("networkpeering"), func() {
102102
).WithProject(data.DefaultProject()),
103103
[]v1.NetworkPeer{
104104
{
105-
ProviderName: "AWS",
105+
ProviderName: provider.ProviderAWS,
106106
AccepterRegionName: config.AWSRegionUS,
107107
ContainerRegion: config.AWSRegionUS,
108108
RouteTableCIDRBlock: "10.0.0.0/24",
@@ -113,14 +113,14 @@ var _ = Describe("NetworkPeering", Label("networkpeering"), func() {
113113
Entry("Test[networkpeering-aws-2]: User has project which was updated with AWS PrivateEndpoint",
114114
Label("network-peering-aws-2"),
115115
model.DataProvider(
116-
"networkpeering-aws-1",
116+
"networkpeering-aws-2",
117117
model.NewEmptyAtlasKeyType().UseDefaulFullAccess(),
118118
40000,
119119
[]func(*model.TestDataProvider){},
120120
).WithProject(data.DefaultProject()),
121121
[]v1.NetworkPeer{
122122
{
123-
ProviderName: "AWS",
123+
ProviderName: provider.ProviderAWS,
124124
AccepterRegionName: config.AWSRegionEU,
125125
ContainerRegion: config.AWSRegionUS,
126126
RouteTableCIDRBlock: "10.0.0.0/24",
@@ -131,21 +131,21 @@ var _ = Describe("NetworkPeering", Label("networkpeering"), func() {
131131
Entry("Test[networkpeering-aws-3]: User has project which was updated with AWS PrivateEndpoint",
132132
Label("network-peering-aws-3"),
133133
model.DataProvider(
134-
"networkpeering-aws-1",
134+
"networkpeering-aws-3",
135135
model.NewEmptyAtlasKeyType().UseDefaulFullAccess(),
136136
40000,
137137
[]func(*model.TestDataProvider){},
138138
).WithProject(data.DefaultProject()),
139139
[]v1.NetworkPeer{
140140
{
141-
ProviderName: "AWS",
141+
ProviderName: provider.ProviderAWS,
142142
AccepterRegionName: config.AWSRegionEU,
143143
ContainerRegion: config.AWSRegionUS,
144144
RouteTableCIDRBlock: "192.168.0.0/16",
145145
AtlasCIDRBlock: "10.8.0.0/22",
146146
},
147147
{
148-
ProviderName: "AWS",
148+
ProviderName: provider.ProviderAWS,
149149
AccepterRegionName: config.AWSRegionUS,
150150
RouteTableCIDRBlock: "10.0.0.0/24",
151151
AtlasCIDRBlock: "10.8.0.0/22",
@@ -155,36 +155,36 @@ var _ = Describe("NetworkPeering", Label("networkpeering"), func() {
155155
Entry("Test[networkpeering-gcp-1]: User has project which was updated with GCP PrivateEndpoint",
156156
Label("network-peering-gcp-1"),
157157
model.DataProvider(
158-
"networkpeering-aws-1",
158+
"networkpeering-gcp-1",
159159
model.NewEmptyAtlasKeyType().UseDefaulFullAccess(),
160160
40000,
161161
[]func(*model.TestDataProvider){},
162162
).WithProject(data.DefaultProject()),
163163
[]v1.NetworkPeer{
164164
{
165-
ProviderName: "GCP",
165+
ProviderName: provider.ProviderGCP,
166166
AccepterRegionName: config.GCPRegion,
167167
RouteTableCIDRBlock: "192.168.0.0/16",
168168
AtlasCIDRBlock: "10.8.0.0/18",
169-
NetworkName: newRandomVPCName("network-peering-gcp-1-vpc"),
169+
NetworkName: newRandomVPCName(networkpeer.GCPVPCName),
170170
GCPProjectID: cloud.GoogleProjectID,
171171
},
172172
},
173173
),
174174
Entry("Test[networkpeering-azure-1]: User has project which was updated with Azure PrivateEndpoint",
175175
Label("network-peering-azure-1"),
176176
model.DataProvider(
177-
"networkpeering-aws-1",
177+
"networkpeering-azure-1",
178178
model.NewEmptyAtlasKeyType().UseDefaulFullAccess(),
179179
40000,
180180
[]func(*model.TestDataProvider){},
181181
).WithProject(data.DefaultProject()),
182182
[]v1.NetworkPeer{
183183
{
184-
ProviderName: "AZURE",
184+
ProviderName: provider.ProviderAzure,
185185
AccepterRegionName: "US_EAST_2",
186186
AtlasCIDRBlock: "192.168.248.0/21",
187-
VNetName: newRandomVPCName("test-vnet"),
187+
VNetName: newRandomVPCName(networkpeer.AzureVPCName),
188188
AzureSubscriptionID: os.Getenv(networkpeer.SubscriptionID),
189189
ResourceGroupName: networkpeer.AzureResourceGroupName,
190190
AzureDirectoryID: os.Getenv(networkpeer.DirectoryID),

0 commit comments

Comments
 (0)