@@ -41,27 +41,27 @@ func TestGetSecretReference(t *testing.T) {
4141 },
4242 "namespace, no name" : {
4343 secretParams : SnapshotterSecretParams ,
44- params : map [string ]string {prefixedSnapshotterSecretNamespaceKey : "foo" },
44+ params : map [string ]string {PrefixedSnapshotterSecretNamespaceKey : "foo" },
4545 expectErr : true ,
4646 },
4747 "simple - valid" : {
4848 secretParams : SnapshotterSecretParams ,
49- params : map [string ]string {prefixedSnapshotterSecretNameKey : "name" , prefixedSnapshotterSecretNamespaceKey : "ns" },
49+ params : map [string ]string {PrefixedSnapshotterSecretNameKey : "name" , PrefixedSnapshotterSecretNamespaceKey : "ns" },
5050 snapshot : & crdv1.VolumeSnapshot {},
5151 expectRef : & v1.SecretReference {Name : "name" , Namespace : "ns" },
5252 },
5353 "simple - invalid name" : {
5454 secretParams : SnapshotterSecretParams ,
55- params : map [string ]string {prefixedSnapshotterSecretNameKey : "bad name" , prefixedSnapshotterSecretNamespaceKey : "ns" },
55+ params : map [string ]string {PrefixedSnapshotterSecretNameKey : "bad name" , PrefixedSnapshotterSecretNamespaceKey : "ns" },
5656 snapshot : & crdv1.VolumeSnapshot {},
5757 expectRef : nil ,
5858 expectErr : true ,
5959 },
6060 "template - invalid" : {
6161 secretParams : SnapshotterSecretParams ,
6262 params : map [string ]string {
63- prefixedSnapshotterSecretNameKey : "static-${volumesnapshotcontent.name}-${volumesnapshot.namespace}-${volumesnapshot.name}-${volumesnapshot.annotations['akey']}" ,
64- prefixedSnapshotterSecretNamespaceKey : "static-${volumesnapshotcontent.name}-${volumesnapshot.namespace}" ,
63+ PrefixedSnapshotterSecretNameKey : "static-${volumesnapshotcontent.name}-${volumesnapshot.namespace}-${volumesnapshot.name}-${volumesnapshot.annotations['akey']}" ,
64+ PrefixedSnapshotterSecretNamespaceKey : "static-${volumesnapshotcontent.name}-${volumesnapshot.namespace}" ,
6565 },
6666 snapContentName : "snapcontentname" ,
6767 snapshot : & crdv1.VolumeSnapshot {
@@ -111,14 +111,14 @@ func TestRemovePrefixedCSIParams(t *testing.T) {
111111 },
112112 {
113113 name : "one prefixed" ,
114- params : map [string ]string {prefixedSnapshotterSecretNameKey : "bar" , "bim" : "baz" },
114+ params : map [string ]string {PrefixedSnapshotterSecretNameKey : "bar" , "bim" : "baz" },
115115 expectedParams : map [string ]string {"bim" : "baz" },
116116 },
117117 {
118118 name : "all known prefixed" ,
119119 params : map [string ]string {
120- prefixedSnapshotterSecretNameKey : "csiBar" ,
121- prefixedSnapshotterSecretNamespaceKey : "csiBar" ,
120+ PrefixedSnapshotterSecretNameKey : "csiBar" ,
121+ PrefixedSnapshotterSecretNamespaceKey : "csiBar" ,
122122 },
123123 expectedParams : map [string ]string {},
124124 },
0 commit comments