@@ -202,7 +202,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
202
202
203
203
serverError , ok := status .FromError (err )
204
204
Expect (ok ).To (BeTrue ())
205
- Expect (serverError .Code ()).To (Equal (codes .Aborted ))
205
+ Expect (serverError .Code ()).To (Equal (codes .Aborted ), "unexpected error: %s" , serverError . Message () )
206
206
})
207
207
208
208
It ("check the presence of new volumes and absence of deleted ones in the volume list" , func () {
@@ -384,7 +384,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
384
384
385
385
serverError , ok := status .FromError (err )
386
386
Expect (ok ).To (BeTrue ())
387
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
387
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
388
388
})
389
389
390
390
It ("should fail when no volume capabilities are provided" , func () {
@@ -401,7 +401,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
401
401
402
402
serverError , ok := status .FromError (err )
403
403
Expect (ok ).To (BeTrue ())
404
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
404
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
405
405
})
406
406
407
407
// TODO: whether CreateVolume request with no capacity should fail or not depends on driver implementation
@@ -538,7 +538,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
538
538
Expect (err ).To (HaveOccurred ())
539
539
serverError , ok := status .FromError (err )
540
540
Expect (ok ).To (BeTrue ())
541
- Expect (serverError .Code ()).To (Equal (codes .AlreadyExists ))
541
+ Expect (serverError .Code ()).To (Equal (codes .AlreadyExists ), "unexpected error: %s" , serverError . Message () )
542
542
})
543
543
544
544
It ("should not fail when creating volume with maximum-length name" , func () {
@@ -610,7 +610,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
610
610
Expect (err ).To (HaveOccurred ())
611
611
serverError , ok := status .FromError (err )
612
612
Expect (ok ).To (BeTrue ())
613
- Expect (serverError .Code ()).To (Equal (codes .NotFound ))
613
+ Expect (serverError .Code ()).To (Equal (codes .NotFound ), "unexpected error: %s" , serverError . Message () )
614
614
})
615
615
616
616
It ("should create volume from an existing source volume" , func () {
@@ -656,7 +656,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
656
656
Expect (err ).To (HaveOccurred ())
657
657
serverError , ok := status .FromError (err )
658
658
Expect (ok ).To (BeTrue ())
659
- Expect (serverError .Code ()).To (Equal (codes .NotFound ))
659
+ Expect (serverError .Code ()).To (Equal (codes .NotFound ), "unexpected error: %s" , serverError . Message () )
660
660
})
661
661
})
662
662
@@ -679,7 +679,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
679
679
680
680
serverError , ok := status .FromError (err )
681
681
Expect (ok ).To (BeTrue ())
682
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
682
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
683
683
})
684
684
685
685
It ("should succeed when an invalid volume id is used" , func () {
@@ -741,7 +741,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
741
741
742
742
serverError , ok := status .FromError (err )
743
743
Expect (ok ).To (BeTrue ())
744
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
744
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
745
745
})
746
746
747
747
It ("should fail when no volume capabilities are provided" , func () {
@@ -776,7 +776,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
776
776
777
777
serverError , ok := status .FromError (err )
778
778
Expect (ok ).To (BeTrue ())
779
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
779
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
780
780
})
781
781
782
782
It ("should return appropriate values (no optional values added)" , func () {
@@ -837,7 +837,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
837
837
838
838
serverError , ok := status .FromError (err )
839
839
Expect (ok ).To (BeTrue ())
840
- Expect (serverError .Code ()).To (Equal (codes .NotFound ))
840
+ Expect (serverError .Code ()).To (Equal (codes .NotFound ), "unexpected error: %s" , serverError . Message () )
841
841
})
842
842
})
843
843
@@ -860,7 +860,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
860
860
861
861
serverError , ok := status .FromError (err )
862
862
Expect (ok ).To (BeTrue ())
863
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
863
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
864
864
})
865
865
866
866
It ("should fail when no node id is provided" , func () {
@@ -876,7 +876,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
876
876
877
877
serverError , ok := status .FromError (err )
878
878
Expect (ok ).To (BeTrue ())
879
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
879
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
880
880
})
881
881
882
882
It ("should fail when no volume capability is provided" , func () {
@@ -893,7 +893,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
893
893
894
894
serverError , ok := status .FromError (err )
895
895
Expect (ok ).To (BeTrue ())
896
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
896
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
897
897
})
898
898
899
899
It ("should fail when publishing more volumes than the node max attach limit" , func () {
@@ -955,7 +955,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
955
955
956
956
serverError , ok := status .FromError (err )
957
957
Expect (ok ).To (BeTrue ())
958
- Expect (serverError .Code ()).To (Equal (codes .NotFound ))
958
+ Expect (serverError .Code ()).To (Equal (codes .NotFound ), "unexpected error: %s" , serverError . Message () )
959
959
})
960
960
961
961
It ("should fail when the node does not exist" , func () {
@@ -994,7 +994,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
994
994
995
995
serverError , ok := status .FromError (err )
996
996
Expect (ok ).To (BeTrue ())
997
- Expect (serverError .Code ()).To (Equal (codes .NotFound ))
997
+ Expect (serverError .Code ()).To (Equal (codes .NotFound ), "unexpected error: %s" , serverError . Message () )
998
998
})
999
999
1000
1000
It ("should fail when the volume is already published but is incompatible" , func () {
@@ -1048,7 +1048,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
1048
1048
1049
1049
serverError , ok := status .FromError (err )
1050
1050
Expect (ok ).To (BeTrue ())
1051
- Expect (serverError .Code ()).To (Equal (codes .AlreadyExists ))
1051
+ Expect (serverError .Code ()).To (Equal (codes .AlreadyExists ), "unexpected error: %s" , serverError . Message () )
1052
1052
})
1053
1053
})
1054
1054
@@ -1087,7 +1087,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
1087
1087
1088
1088
serverError , ok := status .FromError (err )
1089
1089
Expect (ok ).To (BeTrue ())
1090
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
1090
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
1091
1091
})
1092
1092
})
1093
1093
})
@@ -1337,7 +1337,7 @@ var _ = DescribeSanity("DeleteSnapshot [Controller Server]", func(sc *TestContex
1337
1337
1338
1338
serverError , ok := status .FromError (err )
1339
1339
Expect (ok ).To (BeTrue ())
1340
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
1340
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
1341
1341
})
1342
1342
1343
1343
It ("should succeed when an invalid snapshot id is used" , func () {
@@ -1394,7 +1394,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *TestContex
1394
1394
Expect (err ).To (HaveOccurred ())
1395
1395
serverError , ok := status .FromError (err )
1396
1396
Expect (ok ).To (BeTrue ())
1397
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
1397
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
1398
1398
})
1399
1399
1400
1400
It ("should fail when no source volume id is provided" , func () {
@@ -1411,7 +1411,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *TestContex
1411
1411
Expect (err ).To (HaveOccurred ())
1412
1412
serverError , ok := status .FromError (err )
1413
1413
Expect (ok ).To (BeTrue ())
1414
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
1414
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
1415
1415
})
1416
1416
1417
1417
It ("should succeed when requesting to create a snapshot with already existing name and same source volume ID" , func () {
@@ -1444,7 +1444,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *TestContex
1444
1444
Expect (err ).To (HaveOccurred ())
1445
1445
serverError , ok := status .FromError (err )
1446
1446
Expect (ok ).To (BeTrue ())
1447
- Expect (serverError .Code ()).To (Equal (codes .AlreadyExists ))
1447
+ Expect (serverError .Code ()).To (Equal (codes .AlreadyExists ), "unexpected error: %s" , serverError . Message () )
1448
1448
})
1449
1449
1450
1450
It ("should succeed when creating snapshot with maximum-length name" , func () {
@@ -1500,7 +1500,7 @@ var _ = DescribeSanity("ExpandVolume [Controller Server]", func(sc *TestContext)
1500
1500
1501
1501
serverError , ok := status .FromError (err )
1502
1502
Expect (ok ).To (BeTrue ())
1503
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
1503
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
1504
1504
})
1505
1505
1506
1506
It ("should fail if no capacity range is given" , func () {
@@ -1514,7 +1514,7 @@ var _ = DescribeSanity("ExpandVolume [Controller Server]", func(sc *TestContext)
1514
1514
1515
1515
serverError , ok := status .FromError (err )
1516
1516
Expect (ok ).To (BeTrue ())
1517
- Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
1517
+ Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ), "unexpected error: %s" , serverError . Message () )
1518
1518
})
1519
1519
1520
1520
It ("should work" , func () {
0 commit comments