@@ -13,6 +13,7 @@ type driverConfig struct {
13
13
StorageClassFile string
14
14
StorageClass string
15
15
SnapshotClassFile string
16
+ SnapshotClass string
16
17
Capabilities []string
17
18
SupportedFsType []string
18
19
MinimumVolumeSize string
@@ -115,11 +116,15 @@ func generateDriverConfigFile(testParams *testParameters, storageClassFile strin
115
116
}
116
117
117
118
var absSnapshotClassFilePath string
119
+ var snapshotClassName string
118
120
// If snapshot class is passed in as argument, include snapshot specific driver capabiltiites.
119
121
if testParams .snapshotClassFile != "" {
120
122
caps = append (caps , "snapshotDataSource" )
121
123
// Update the absolute file path pointing to the snapshot class file, if it is provided as an argument.
122
124
absSnapshotClassFilePath = filepath .Join (testParams .pkgDir , testConfigDir , testParams .snapshotClassFile )
125
+ snapshotClassName = testParams .snapshotClassFile [:strings .LastIndex (testParams .snapshotClassFile , "." )]
126
+ } else {
127
+ snapshotClassName = "no-volumesnapshotclass"
123
128
}
124
129
125
130
caps = append (caps , "pvcDataSource" )
@@ -136,6 +141,7 @@ func generateDriverConfigFile(testParams *testParameters, storageClassFile strin
136
141
StorageClassFile : filepath .Join (testParams .pkgDir , testConfigDir , storageClassFile ),
137
142
StorageClass : storageClassFile [:strings .LastIndex (storageClassFile , "." )],
138
143
SnapshotClassFile : absSnapshotClassFilePath ,
144
+ SnapshotClass : snapshotClassName ,
139
145
SupportedFsType : fsTypes ,
140
146
Capabilities : caps ,
141
147
MinimumVolumeSize : minimumVolumeSize ,
0 commit comments