@@ -20,7 +20,6 @@ import (
20
20
"os"
21
21
"reflect"
22
22
"runtime"
23
- "strings"
24
23
"testing"
25
24
26
25
"github.com/google/go-cmp/cmp"
@@ -307,30 +306,6 @@ func TestFsUserFrom(t *testing.T) {
307
306
}
308
307
}
309
308
310
- func TestGenerateVolumeName (t * testing.T ) {
311
-
312
- // Normal operation, no truncate
313
- v1 := GenerateVolumeName ("kubernetes" , "pv-cinder-abcde" , 255 )
314
- if v1 != "kubernetes-dynamic-pv-cinder-abcde" {
315
- t .Errorf ("Expected kubernetes-dynamic-pv-cinder-abcde, got %s" , v1 )
316
- }
317
-
318
- // Truncate trailing "6789-dynamic"
319
- prefix := strings .Repeat ("0123456789" , 9 ) // 90 characters prefix + 8 chars. of "-dynamic"
320
- v2 := GenerateVolumeName (prefix , "pv-cinder-abcde" , 100 )
321
- expect := prefix [:84 ] + "-pv-cinder-abcde"
322
- if v2 != expect {
323
- t .Errorf ("Expected %s, got %s" , expect , v2 )
324
- }
325
-
326
- // Truncate really long cluster name
327
- prefix = strings .Repeat ("0123456789" , 1000 ) // 10000 characters prefix
328
- v3 := GenerateVolumeName (prefix , "pv-cinder-abcde" , 100 )
329
- if v3 != expect {
330
- t .Errorf ("Expected %s, got %s" , expect , v3 )
331
- }
332
- }
333
-
334
309
func TestHasMountRefs (t * testing.T ) {
335
310
testCases := map [string ]struct {
336
311
mountPath string
0 commit comments