Skip to content

Commit 2074266

Browse files
cadejacobsonCade Jacobson
andauthored
Improve testing section of README (#148)
* Improve testing section of README * Correct testing line --------- Co-authored-by: Cade Jacobson <cade.jacobson@mines.sdsmt.edu>
1 parent 5937f71 commit 2074266

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,31 @@ To run the program, you must enter the command `cargo run --bin <binary_name>` a
2525

2626
## Testing
2727

28-
There are two different sets of tests: unit tests and end-to-end (e2e tests). To run unit tests, use `cargo test`.
29-
To run end-to-end testing, use `make e2e-test`, which will create a test user, ssh directory, place mock ssh keys, and
30-
then clean up the test artifacts afterwards.
28+
Azure-init includes two types of tests: unit tests and end-to-end (e2e) tests.
29+
30+
### Running Unit Tests
31+
32+
From the root directory of the repository, run:
33+
34+
```
35+
cargo test --verbose --all-features --workspace
36+
```
37+
38+
This will run the unit tests for every library in the repository, not just for azure-init.
39+
Doing so ensures your testing will match what is run in the CI pipeline.
40+
41+
### Running End-to-End (e2e) Tests
42+
End-to-end tests validate the integration of the entire system. These tests require additional setup, such as setting a subscription ID. To run e2e tests, use the following command from the repository root:
43+
44+
```
45+
make e2e-test
46+
```
47+
48+
This command will:
49+
50+
1. Create a test user and associated SSH directory.
51+
2. Place mock SSH keys for testing.
52+
3. Run the tests and then clean up any test artifacts generated during the process.
3153

3254
## Contributing
3355

0 commit comments

Comments
 (0)