Skip to content

Update local development instructions #1081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function ensure_var(){

function get_needed_roles()
{
echo "roles/compute.storageAdmin roles/iam.serviceAccountUser projects/${PROJECT}/roles/gcp_compute_persistent_disk_csi_driver_custom_role"
echo "roles/editor roles/compute.storageAdmin roles/iam.serviceAccountUser projects/${PROJECT}/roles/gcp_compute_persistent_disk_csi_driver_custom_role"
}

# Installs kustomize in ${PKGDIR}/bin
Expand Down
29 changes: 23 additions & 6 deletions docs/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,36 @@ This page contains information on how to develop and test the driver locally.

## Testing

Running E2E Tests:
```
$ PROJECT=my-project # GCP Project to run tests in
$ [email protected] # Existing IAM Account with GCE PD CSI Driver Permissions
### E2E Tests:

#### One time setup

```console
$ export PROJECT=my-project # GCP Project to run tests in
$ export GCE_PD_SA_NAME=$PROJECT-pd-sa # Name of the service account to create
$ export GCE_PD_SA_DIR=/my/safe/credentials/directory # Directory to save the service account key
$ export ENABLE_KMS=false
$ ./deploy/setup-project.sh
```
#### Ongoing runs
```console
$ export PROJECT=my-project # GCP Project to run tests in
$ export GCE_PD_SA_NAME=$PROJECT-pd-sa
$ export IAM_NAME=$GCE_PD_SA_NAME@$PROJECT.iam.gserviceaccount.com # IAM SA that was set up in "one time setup"

$ ./test/run-e2e-local.sh
```

Running Sanity Tests:
### Sanity Tests
> **_NOTE:_** Sanity tests are currently failing, tracked by go/pdcsi-oss-driver/issues/990.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link only works internally

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point, fixed! Thanks


Sanity tests can be run from VS Code, etc directly or via the cmd line:
```
$ ./test/run-sanity.sh
```

Running Unit Tests:
### Unit Tests
Unit tests can be run from VS Code, etc directly or via the cmd line:
```
$ ./test/run-unit.sh
```
Expand Down