Skip to content

Commit 5a91ae1

Browse files
committed
combine local development guides
1 parent 5507e70 commit 5a91ae1

File tree

3 files changed

+46
-49
lines changed

3 files changed

+46
-49
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The following table captures the compatibility matrix of the core persistent dis
4040
| dev | yes |
4141

4242
The manifest bundle which captures all the driver components (driver pod which includes the containers csi-provisioner, csi-resizer, csi-snapshotter, gce-pd-driver, csi-driver-registrar;
43-
csi driver object, rbacs, pod security policies etc) can be picked up from the master branch [overlays](deploy/kubernetes/overlays) directory. We structure the overlays directory, per minor version of kubernetes because not all driver components can be used with all kubernetes versions.
43+
csi driver object, rbacs, pod security policies etc) can be picked up from the master branch [overlays](deploy/kubernetes/overlays) directory. We structure the overlays directory, per minor version of kubernetes because not all driver components can be used with all kubernetes versions.
4444

4545
Example:
4646

@@ -97,7 +97,7 @@ Controller-level and node-level deployments will both have priorityClassName set
9797

9898
## Further Documentation
9999

100-
[Local Development](docs/local-development.md)
100+
[Local Development](docs/kubernetes/development.md)
101101

102102
For releasing new versions of this driver, googlers should consult [go/pdcsi-oss-release-process](go/pdcsi-oss-release-process).
103103

docs/kubernetes/development.md

+44
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,50 @@ To bring down driver:
1818
```
1919
$ ./deploy/kubernetes/delete-driver.sh
2020
```
21+
## Testing
22+
23+
### E2E Tests:
24+
25+
#### One time setup
26+
27+
```console
28+
$ export PROJECT=my-project # GCP Project to run tests in
29+
$ export GCE_PD_SA_NAME=$PROJECT-pd-sa # Name of the service account to create
30+
$ export GCE_PD_SA_DIR=/my/safe/credentials/directory # Directory to save the service account key
31+
$ export ENABLE_KMS=false
32+
$ ./deploy/setup-project.sh
33+
```
34+
#### Ongoing runs
35+
```console
36+
$ export PROJECT=my-project # GCP Project to run tests in
37+
$ export GCE_PD_SA_NAME=$PROJECT-pd-sa
38+
$ export IAM_NAME=$GCE_PD_SA_NAME@$PROJECT.iam.gserviceaccount.com # IAM SA that was set up in "one time setup"
39+
40+
$ ./test/run-e2e-local.sh
41+
```
42+
43+
### Sanity Tests
44+
> **_NOTE:_** Sanity tests are currently failing, tracked by https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/issues/990.
45+
46+
Sanity tests can be run from VS Code, etc directly or via the cmd line:
47+
```
48+
$ ./test/run-sanity.sh
49+
```
50+
51+
### Unit Tests
52+
Unit tests can be run from VS Code, etc directly or via the cmd line:
53+
```
54+
$ ./test/run-unit.sh
55+
```
56+
57+
## Dependency Management
58+
59+
Use [dep](https://github.com/golang/dep)
60+
```
61+
$ dep ensure
62+
```
63+
64+
To modify dependencies or versions change `./Gopkg.toml`
2165

2266
## Debugging
2367

docs/local-development.md

-47
This file was deleted.

0 commit comments

Comments
 (0)