From 80fb46663e90b8a77c26ffe044dbeb6d3fde9bed Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Thu, 23 Jul 2020 14:08:04 -0400 Subject: [PATCH 1/3] Add some testing guidance and a PR template with a reference to it. --- .github/pull_request_template.md | 13 +++++++++ docs/Development.md | 48 ++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..5320f2be4 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,13 @@ +## Describe the behavior changes introduced in this PR + +## Linked Issues? + +\# use this if merging should close the issue +resolves # + +\# use this if it shouldn't +related to # + +## Testing Instructions + +Please include any additional commands or pointers in addition to our [standard PR testing process](/docs/Development.md#testing-pull-requests). \ No newline at end of file diff --git a/docs/Development.md b/docs/Development.md index 7618579cb..d0feec588 100644 --- a/docs/Development.md +++ b/docs/Development.md @@ -192,3 +192,51 @@ Code also comes with a nice debugger feature. Here is a starter configuration to ``` For more information, see the [Debugging](https://code.visualstudio.com/docs/editor/debugging) doc in VS Code. + +## Testing Pull Requests + +The following are notes and general steps for testing Pull Requests for specific types of changes. + +### Dashboard Changes + +1. Clone/checkout the PR fork/branch + ``` + git remote add themoosman git@github.com:themoosman/pelorus.git + git fetch themoosman + git checkout themoosman/feature-branch + ``` +2. [Install Pelorus](/docs/Install.md) from checked out fork/branch. + >:mag: **Note**
+ >:mag: In most cases you can deploy changes to an existing deployment to retain existing data. +3. Log into Grafana via the grafana route. + ``` + oc get route grafana-route -n pelorus + ``` +4. Click on the dashboard containing changes, and visually validate the behavior change described in the PR + >:mag: **Note**
+ >Eventually we'd like to have some Selenium tests in place to validate dashboards. If you have skills in this area let us know! + +### Exporter Changes + +Most exporter changes can be tested locally. + +1. Clone/checkout the PR fork/branch + ``` + git remote add themoosman git@github.com:themoosman/pelorus.git + git fetch themoosman + git checkout themoosman/feature-branch + ``` +1. Gather necessary [configuration information](/docs/Configuration.md#configuring-exporters). +1. [Run exporter localy](#running-locally). You can do this either via the command line, or use the provided [VSCode debug confuration](#ide-setup-vscode) to run it in your IDE Debugger. +1. Once exporter is running, you can test it via a simple `curl localhost:8080`. You should be validating that: + 1. You get a valid response with metrics. + 1. Confirm the format of expected metrics. + +### Helm Install changes + +For testing changes to the helm chart, you should just follow the [standard install process](/docs/Install.md), then verify that: + +* All expected pods are running and healthy +* Any expected behavior changes mentioned in the PR can be observed. + +We are in the process of refactoring our helm charts such that they can be tested more automatically using [helm chart-testing](https://github.com/helm/chart-testing). Some general guidelines are outlined in the [CoP Helm testing strategy](https://redhat-cop.github.io/ci/linting-testing-helm-charts.html). More to come soon. \ No newline at end of file From 133bc69c4fc6d4f94af8f85cf91dd122ce2de78e Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Thu, 23 Jul 2020 14:09:26 -0400 Subject: [PATCH 2/3] Add mdt team mention --- .github/pull_request_template.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 5320f2be4..77c706f2f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -10,4 +10,6 @@ related to # ## Testing Instructions -Please include any additional commands or pointers in addition to our [standard PR testing process](/docs/Development.md#testing-pull-requests). \ No newline at end of file +Please include any additional commands or pointers in addition to our [standard PR testing process](/docs/Development.md#testing-pull-requests). + +@redhat-cop/mdt \ No newline at end of file From a8702846044ab4856b7bfc61e1ba8e72388f23f1 Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Fri, 24 Jul 2020 09:30:47 -0400 Subject: [PATCH 3/3] Fix formatting --- .github/pull_request_template.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 77c706f2f..8bda616fa 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,11 +2,9 @@ ## Linked Issues? -\# use this if merging should close the issue -resolves # +resolves # <-- Use this if merging should auto-close an issue -\# use this if it shouldn't -related to # +related to # <-- Use this if it shouldn't ## Testing Instructions