Skip to content

Commit e2a0977

Browse files
committed
update local development instructions
1 parent fdbc8ac commit e2a0977

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

deploy/common.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function ensure_var(){
1919

2020
function get_needed_roles()
2121
{
22-
echo "roles/compute.storageAdmin roles/iam.serviceAccountUser projects/${PROJECT}/roles/gcp_compute_persistent_disk_csi_driver_custom_role"
22+
echo "roles/editor roles/compute.storageAdmin roles/iam.serviceAccountUser projects/${PROJECT}/roles/gcp_compute_persistent_disk_csi_driver_custom_role"
2323
}
2424

2525
# Installs kustomize in ${PKGDIR}/bin

docs/local-development.md

+23-6
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,36 @@ This page contains information on how to develop and test the driver locally.
33

44
## Testing
55

6-
Running E2E Tests:
7-
```
8-
$ PROJECT=my-project # GCP Project to run tests in
9-
$ [email protected] # Existing IAM Account with GCE PD CSI Driver Permissions
6+
### E2E Tests:
7+
8+
#### One time setup
9+
10+
```console
11+
$ export PROJECT=my-project # GCP Project to run tests in
12+
$ export GCE_PD_SA_NAME=$PROJECT-pd-sa # Name of the service account to create
13+
$ export GCE_PD_SA_DIR=/my/safe/credentials/directory # Directory to save the service account key
14+
$ export ENABLE_KMS=false
15+
$ ./deploy/setup-project.sh
16+
```
17+
#### Ongoing runs
18+
```console
19+
$ export PROJECT=my-project # GCP Project to run tests in
20+
$ export GCE_PD_SA_NAME=$PROJECT-pd-sa
21+
$ export IAM_NAME=$GCE_PD_SA_NAME@$PROJECT.iam.gserviceaccount.com # IAM SA that was set up in "one time setup"
22+
1023
$ ./test/run-e2e-local.sh
1124
```
1225

13-
Running Sanity Tests:
26+
### Sanity Tests
27+
> **_NOTE:_** Sanity tests are currently failing, tracked by go/pdcsi-oss-driver/issues/990.
28+
29+
Unit tests can be run from VS Code, etc directly or via the cmd line:
1430
```
1531
$ ./test/run-sanity.sh
1632
```
1733

18-
Running Unit Tests:
34+
### Unit Tests
35+
Unit tests can be run from VS Code, etc directly or via the cmd line:
1936
```
2037
$ ./test/run-unit.sh
2138
```

0 commit comments

Comments
 (0)