Skip to content

Commit 1be56d7

Browse files
authored
Merge pull request #21 from jacobwolfaws/main
add sanity testing
2 parents 7387364 + 20dfdfb commit 1be56d7

File tree

344 files changed

+225535
-249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

344 files changed

+225535
-249
lines changed

CHANGELOG-0.x.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# v0.1.0
2-
3-
[//]: # (TODO: Create v0.1.0 branch)
42
[Documentation](https://github.com/kubernetes-sigs/aws-file-cache-csi-driver/blob/v0.1.0/docs/README.md)
53

64
### Notable changes

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ sub-image-%:
7979
.PHONY: test
8080
test:
8181
go test -v -race ./pkg/...
82+
go test -v ./tests/sanity/...
8283

8384
.PHONY: clean
8485
clean:

examples/kubernetes/dynamic_provisioning/specs/storageclass.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ metadata:
44
name: fc-sc
55
provisioner: filecache.csi.aws.com
66
parameters:
7-
subnetId: subnet-074ea3b7386e4802b
8-
securityGroupIds: sg-046ad64768e4cf756
7+
subnetId: subnet-0980aa7d25bc5fbf6
8+
securityGroupIds: sg-0ce0ae50c693cdf88
99
dataRepositoryAssociations: "FileCachePath=/ns1/,DataRepositoryPath=nfs://10.0.92.69/,NFS={Version=NFS3},DataRepositorySubdirectories=[subdir1,subdir2,subdir3]"
1010
fileCacheType: "LUSTRE"
1111
fileCacheTypeVersion: "2.12"

examples/kubernetes/static_provisioning/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
- ReadWriteMany
1717
mountOptions:
1818
- flock
19-
persistentVolumeReclaimPolicy: Recycle
19+
persistentVolumeReclaimPolicy: Retain
2020
csi:
2121
driver: filecache.csi.aws.com
2222
volumeHandle: [FileCacheId]

examples/kubernetes/static_provisioning/specs/pv.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
persistentVolumeReclaimPolicy: Retain
1414
csi:
1515
driver: filecache.csi.aws.com
16-
volumeHandle: fc-0ef97ba968aaae830
16+
volumeHandle: fc-052e0e05e02430ef2
1717
volumeAttributes:
18-
dnsname: fc-0ef97ba968aaae830.fsx.us-east-1.amazonaws.com
19-
mountname: uvh2hbev
18+
dnsname: fc-052e0e05e02430ef2.fsx.us-east-1.amazonaws.com
19+
mountname: r473jbev

go.mod

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,34 @@ module sigs.k8s.io/aws-file-cache-csi-driver
33
go 1.19
44

55
require (
6-
github.com/aws/aws-sdk-go v1.44.181
6+
github.com/aws/aws-sdk-go v1.44.225
77
github.com/container-storage-interface/spec v1.7.0
88
github.com/golang/mock v1.6.0
9+
github.com/kubernetes-csi/csi-test v2.0.1+incompatible
10+
github.com/onsi/ginkgo v1.16.5
11+
github.com/onsi/gomega v1.23.0
912
google.golang.org/grpc v1.27.0
1013
k8s.io/apimachinery v0.26.1
1114
k8s.io/klog/v2 v2.80.1
1215
k8s.io/mount-utils v0.26.0
1316
)
1417

1518
require (
19+
github.com/fsnotify/fsnotify v1.4.9 // indirect
1620
github.com/go-logr/logr v1.2.3 // indirect
1721
github.com/golang/glog v1.0.0 // indirect
1822
github.com/golang/protobuf v1.5.2 // indirect
23+
github.com/google/go-cmp v0.5.9 // indirect
1924
github.com/jmespath/go-jmespath v0.4.0 // indirect
2025
github.com/moby/sys/mountinfo v0.6.2 // indirect
26+
github.com/nxadm/tail v1.4.8 // indirect
2127
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
2228
golang.org/x/sys v0.3.0 // indirect
2329
golang.org/x/text v0.5.0 // indirect
24-
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect
30+
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154 // indirect
2531
google.golang.org/protobuf v1.28.1 // indirect
32+
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
33+
gopkg.in/yaml.v2 v2.4.0 // indirect
34+
gopkg.in/yaml.v3 v3.0.1 // indirect
2635
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect
2736
)

go.sum

Lines changed: 72 additions & 1 deletion
Large diffs are not rendered by default.

hack/update-gomock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ set -euo pipefail
1818

1919
IMPORT_PATH=sigs.k8s.io/aws-file-cache-csi-driver
2020
mockgen -package=mocks -destination=./pkg/driver/mocks/mock_mount.go --build_flags=--mod=mod ${IMPORT_PATH}/pkg/driver Mounter
21+
mockgen -package=mocks -destination=./pkg/cloud/mocks/mock_ec2metadata.go --build_flags=--mod=mod ${IMPORT_PATH}/pkg/cloud EC2Metadata
22+
mockgen -package=mocks -destination=./pkg/cloud/mocks/mock_fsx.go --build_flags=--mod=mod ${IMPORT_PATH}/pkg/cloud FSx
2123
mockgen -package=mocks -destination=./pkg/driver/mocks/mock_cloud.go --build_flags=--mod=mod ${IMPORT_PATH}/pkg/cloud Cloud

pkg/cloud/cloud.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ type FileCache struct {
100100
MountName string
101101
FileCacheType string
102102
FileCacheTypeVersion string
103-
perUnitStorageThroughput int64
103+
PerUnitStorageThroughput int64
104104
}
105105

106106
type FileCacheOptions struct {
@@ -309,7 +309,7 @@ func (c *cloud) CreateFileCache(ctx context.Context, volumeName string, fileCach
309309
MountName: mountName,
310310
FileCacheType: *output.FileCache.FileCacheType,
311311
FileCacheTypeVersion: *output.FileCache.FileCacheTypeVersion,
312-
perUnitStorageThroughput: perUnitStorageThroughput,
312+
PerUnitStorageThroughput: perUnitStorageThroughput,
313313
}, nil
314314
}
315315

@@ -349,7 +349,7 @@ func (c *cloud) DescribeFileCache(ctx context.Context, fileCacheId string) (*Fil
349349
MountName: mountName,
350350
FileCacheType: *fc.FileCacheType,
351351
FileCacheTypeVersion: *fc.FileCacheTypeVersion,
352-
perUnitStorageThroughput: perUnitStorageThroughput,
352+
PerUnitStorageThroughput: perUnitStorageThroughput,
353353
}, nil
354354
}
355355

0 commit comments

Comments
 (0)