Skip to content

Commit c468a15

Browse files
Merge pull request #377 from tnierman/osd-28775
OSD-28775 - Add basic instructions to include test objects for new investigations
2 parents 14e1e85 + 71267da commit c468a15

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ To add a new alert investigation:
6969

7070
- run `make bootstrap-investigation` to generate boilerplate code in `pkg/investigations` (This creates the corresponding folder & .go file, and also appends the investigation to the `availableInvestigations` interface in `registry.go`.).
7171
- investigation.Resources contain initialized clients for the clusters aws environment, ocm and more. See [Integrations](#integrations)
72+
- Add test objects or scripts used to recreate the alert symptoms to the `pkg/investigations/$INVESTIGATION_NAME/testing/` directory for future use. Be sure to clearly document the testing procedure under the `Testing` section of the investigation-specific README.md file
7273

7374
### Integrations
7475

hack/bootstrap-investigation.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,30 @@ ls "${INVESTIGATION_DIR}"
4242
touch "${INVESTIGATION_DIR}/${INVESTIGATION_NAME}.go"
4343
touch "${INVESTIGATION_DIR}/metadata.yaml"
4444
touch "${INVESTIGATION_DIR}/README.md"
45+
mkdir "${INVESTIGATION_DIR}/testing/"
4546

4647
# Create README.md file
4748
cat <<EOF > "${INVESTIGATION_DIR}/README.md"
4849
# ${INVESTIGATION_NAME} Investigation
4950
5051
${INVESTIGATION_DESCRIPTION}
5152
53+
## Testing
54+
55+
Refer to the [testing README](./testing/README.md) for instructions on testing this investigation
56+
57+
EOF
58+
59+
# Create testing/README.md file
60+
cat <<EOF > "${INVESTIGATION_DIR}/testing/README.md"
61+
# Testing ${INVESTIGATION_NAME} Investigation
62+
63+
TODO:
64+
- Add a test script or test objects to this `testing/` directory for future maintainers to use
65+
- Edit this README file and add detailed instructions on how to use the script/objects to recreate the conditions for the investigation. Be sure to include any assumptions or prerequisites about the environment (disable hive syncsetting, etc)
5266
EOF
5367

68+
5469
# Create metadata.yaml file
5570
cat <<EOF > "${INVESTIGATION_DIR}/metadata.yaml"
5671
name: ${INVESTIGATION_NAME}

0 commit comments

Comments
 (0)