Skip to content

Commit 1194514

Browse files
committed
Fixing the gofmt issue
1 parent c8edde4 commit 1194514

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

pkg/blob/blob_test.go

+4-7
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ import (
3636
"k8s.io/client-go/kubernetes"
3737
"k8s.io/client-go/kubernetes/fake"
3838

39-
//fakecloud "k8s.io/cloud-provider/fake"
40-
4139
"sigs.k8s.io/blob-csi-driver/pkg/util"
4240
"sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/mockstorageaccountclient"
4341
azure "sigs.k8s.io/cloud-provider-azure/pkg/provider"
@@ -827,7 +825,7 @@ func TestGetStorageAccount(t *testing.T) {
827825
}
828826
}
829827

830-
//needs editing, could only get past first error for testing, could not get a fake environment running
828+
// needs editing, could only get past first error for testing, could not get a fake environment running
831829
func TestGetContainerReference(t *testing.T) {
832830
fakeAccountName := "storageaccountname"
833831
fakeAccountKey := "test-key"
@@ -882,7 +880,6 @@ func TestGetContainerReference(t *testing.T) {
882880

883881
d := NewFakeDriver()
884882
d.cloud = azure.GetTestCloud(gomock.NewController(t))
885-
//encodedStr := base64.StdEncoding.EncodeToString([]byte{12, 34, 56})
886883
d.cloud.KubeClient = fake.NewSimpleClientset()
887884

888885
for _, tc := range testCases {
@@ -961,7 +958,7 @@ func TestGetStorageAccesskey(t *testing.T) {
961958
SubscriptionID: "test-subID",
962959
ResourceGroup: "test-rg",
963960
}
964-
fakeAccName := options.Name //fmt.Sprintf(secretNameTemplate, options.Name)
961+
fakeAccName := options.Name
965962
fakeAccKey := "test-key"
966963
secretNamespace := "test-ns"
967964
testCases := []struct {
@@ -1065,8 +1062,8 @@ func TestGetStorageAccountFromSecret(t *testing.T) {
10651062
secretName := ""
10661063
secretNamespace := ""
10671064
_, _, err := d.GetStorageAccountFromSecret(secretName, secretNamespace)
1068-
//expectedErr := fmt.Errorf("could not get secret(%v): %w", secretName, err)
1069-
assert.Error(t, err) //could not check what type of error, needs fix
1065+
// expectedErr := fmt.Errorf("could not get secret(%v): %w", secretName, err)
1066+
assert.Error(t, err) // could not check what type of error, needs fix
10701067
/*if assert.Error(t, err) {
10711068
assert.Equal(t, expectedErr, err)
10721069
}*/

pkg/blob/controllerserver_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ const (
4747
NULL
4848
)
4949

50-
//mock blobclient that returns the errortype for create/delete/get operations (default value nil)
50+
// mock blobclient that returns the errortype for create/delete/get operations (default value nil)
5151
type mockBlobClient struct {
52-
//type of error returned
52+
// type of error returned
5353
errorType *errType
54-
//custom string for error type CUSTOM
54+
// custom string for error type CUSTOM
5555
custom *string
5656
conProp *storage.ContainerProperties
5757
}
@@ -94,7 +94,7 @@ func newMockBlobClient(errorType *errType, custom *string, conProp *storage.Cont
9494
return &mockBlobClient{errorType: errorType, custom: custom, conProp: conProp}
9595
}
9696

97-
//creates and returns mock storage account client
97+
// creates and returns mock storage account client
9898
func NewMockSAClient(ctx context.Context, ctrl *gomock.Controller, subsID, rg, accName string, keyList *[]storage.AccountKey) *mockstorageaccountclient.MockInterface {
9999
cl := mockstorageaccountclient.NewMockInterface(ctrl)
100100

0 commit comments

Comments
 (0)