@@ -88,7 +88,7 @@ var _ = Describe("GCE PD CSI Driver Multi-Zone", func() {
88
88
89
89
// Create Disk
90
90
volName := testNamePrefix + string (uuid .NewUUID ())
91
- volId , err := controllerClient .CreateVolume (volName , map [string ]string {
91
+ volID , err := controllerClient .CreateVolume (volName , map [string ]string {
92
92
common .ParameterKeyReplicationType : "regional-pd" ,
93
93
}, defaultSizeGb , & csi.TopologyRequirement {
94
94
Requisite : []* csi.Topology {
@@ -119,7 +119,7 @@ var _ = Describe("GCE PD CSI Driver Multi-Zone", func() {
119
119
120
120
defer func () {
121
121
// Delete Disk
122
- controllerClient .DeleteVolume (volId )
122
+ controllerClient .DeleteVolume (volID )
123
123
Expect (err ).To (BeNil (), "DeleteVolume failed" )
124
124
125
125
// Validate Disk Deleted
@@ -134,45 +134,45 @@ var _ = Describe("GCE PD CSI Driver Multi-Zone", func() {
134
134
if i >= 1 {
135
135
readOnly = true
136
136
}
137
- testAttachWriteReadDetach (volId , volName , testContext .Instance , testContext .Client , readOnly )
137
+ testAttachWriteReadDetach (volID , volName , testContext .Instance , testContext .Client , readOnly )
138
138
i = i + 1
139
139
}
140
140
141
141
})
142
142
143
143
})
144
144
145
- func testAttachWriteReadDetach (volId string , volName string , instance * remote.InstanceInfo , client * remote.CsiClient , readOnly bool ) {
145
+ func testAttachWriteReadDetach (volID string , volName string , instance * remote.InstanceInfo , client * remote.CsiClient , readOnly bool ) {
146
146
var err error
147
147
148
- Logf ("Starting testAttachWriteReadDetach with volume %v node %v with readonly %v\n " , volId , instance .GetNodeID (), readOnly )
148
+ Logf ("Starting testAttachWriteReadDetach with volume %v node %v with readonly %v\n " , volID , instance .GetNodeID (), readOnly )
149
149
// Attach Disk
150
- err = client .ControllerPublishVolume (volId , instance .GetNodeID ())
151
- Expect (err ).To (BeNil (), "ControllerPublishVolume failed with error for disk %v on node %v" , volId , instance .GetNodeID ())
150
+ err = client .ControllerPublishVolume (volID , instance .GetNodeID ())
151
+ Expect (err ).To (BeNil (), "ControllerPublishVolume failed with error for disk %v on node %v" , volID , instance .GetNodeID ())
152
152
153
153
defer func () {
154
154
155
155
// Detach Disk
156
- err = client .ControllerUnpublishVolume (volId , instance .GetNodeID ())
156
+ err = client .ControllerUnpublishVolume (volID , instance .GetNodeID ())
157
157
Expect (err ).To (BeNil (), "ControllerUnpublishVolume failed with error" )
158
158
}()
159
159
160
160
// Stage Disk
161
161
stageDir := filepath .Join ("/tmp/" , volName , "stage" )
162
- client .NodeStageVolume (volId , stageDir )
162
+ client .NodeStageVolume (volID , stageDir )
163
163
Expect (err ).To (BeNil (), "NodeStageVolume failed with error" )
164
164
165
165
defer func () {
166
166
// Unstage Disk
167
- err = client .NodeUnstageVolume (volId , stageDir )
167
+ err = client .NodeUnstageVolume (volID , stageDir )
168
168
Expect (err ).To (BeNil (), "NodeUnstageVolume failed with error" )
169
169
err = testutils .RmAll (instance , filepath .Join ("/tmp/" , volName ))
170
170
Expect (err ).To (BeNil (), "Failed to remove temp directory" )
171
171
}()
172
172
173
173
// Mount Disk
174
174
publishDir := filepath .Join ("/tmp/" , volName , "mount" )
175
- err = client .NodePublishVolume (volId , stageDir , publishDir )
175
+ err = client .NodePublishVolume (volID , stageDir , publishDir )
176
176
Expect (err ).To (BeNil (), "NodePublishVolume failed with error" )
177
177
err = testutils .ForceChmod (instance , filepath .Join ("/tmp/" , volName ), "777" )
178
178
Expect (err ).To (BeNil (), "Chmod failed with error" )
@@ -185,12 +185,12 @@ func testAttachWriteReadDetach(volId string, volName string, instance *remote.In
185
185
}
186
186
187
187
// Unmount Disk
188
- err = client .NodeUnpublishVolume (volId , publishDir )
188
+ err = client .NodeUnpublishVolume (volID , publishDir )
189
189
Expect (err ).To (BeNil (), "NodeUnpublishVolume failed with error" )
190
190
191
191
// Mount disk somewhere else
192
192
secondPublishDir := filepath .Join ("/tmp/" , volName , "secondmount" )
193
- err = client .NodePublishVolume (volId , stageDir , secondPublishDir )
193
+ err = client .NodePublishVolume (volID , stageDir , secondPublishDir )
194
194
Expect (err ).To (BeNil (), "NodePublishVolume failed with error" )
195
195
err = testutils .ForceChmod (instance , filepath .Join ("/tmp/" , volName ), "777" )
196
196
Expect (err ).To (BeNil (), "Chmod failed with error" )
@@ -202,8 +202,8 @@ func testAttachWriteReadDetach(volId string, volName string, instance *remote.In
202
202
Expect (strings .TrimSpace (string (readContents ))).To (Equal (testFileContents ))
203
203
204
204
// Unmount Disk
205
- err = client .NodeUnpublishVolume (volId , secondPublishDir )
205
+ err = client .NodeUnpublishVolume (volID , secondPublishDir )
206
206
Expect (err ).To (BeNil (), "NodeUnpublishVolume failed with error" )
207
207
208
- Logf ("Completed testAttachWriteReadDetach with volume %v node %v\n " , volId , instance .GetNodeID ())
208
+ Logf ("Completed testAttachWriteReadDetach with volume %v node %v\n " , volID , instance .GetNodeID ())
209
209
}
0 commit comments