Skip to content
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

chore: Cleanup file with test data #311

Merged
merged 3 commits into from
Jan 6, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ Script accept next options:
| 5 | `RAW_TEST_`<br>`RESULTS_FILE_NAME` | `terraform_tfsec_pr123` | (Temporary) File where all test data will be stored. |
<!-- markdownlint-enable no-inline-html -->

> **Note:** To make test results repeatable and comparable, be sure that on the test machine nothing generates an unstable workload. During tests good to stop any other apps and do not interact with the test machine.
>
> Otherwise, for eg, when you watch Youtube videos during one test and not during other, test results can differ up to 30% for the same test.

### Run via BASH

```bash
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:
- '**/*.sh'
- 'Dockerfile'
- '.pre-commit-hooks.yaml'

# Ignore paths
- '!tests/**'
jobs:
release:
name: Release
Expand Down
2 changes: 2 additions & 0 deletions tests/hooks_performance_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function run_tests {
RESULTS_DIR="$(pwd)/tests/results"

cd "$TEST_DIR" || { echo "Specified TEST_DIR does not exist" && exit 1; }
# Cleanup
rm "$RESULTS_DIR/$FILE_NAME_TO_SAVE_TEST_RESULTS"

for ((i = 1; i <= TEST_NUM; i++)); do
{
Expand Down