Skip to content

Commit

Permalink
[ControlPlane] Add mock for control plane session (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
roei3000b authored Jun 20, 2023
1 parent 5218059 commit 24b0cf9
Show file tree
Hide file tree
Showing 2 changed files with 474 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,16 @@
V3IO_CONTROLPLANE_PASSWORD=<admin-password> \
V3IO_CONTROLPLANE_IGZ_ADMIN_PASSWORD=<igz_admin-password> \
make test
```
```
## Mocking
We used [mockery](https://vektra.github.io/mockery/) to generate mocks for the interfaces in the `v3io` package.
To generate mock for interface in specific path you can run:
```bash
mockery --dir <path_to_dir_contains_interface> --name <interface_name>
```

For example, to generate mock for `Session` interface in `controlplane` you can run:
```bash
mockery --dir pkg/controlplane --name Session
```
Loading

0 comments on commit 24b0cf9

Please sign in to comment.