Skip to content
Merged
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
33 changes: 33 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
This folder contains e2e tests for the MCO Operator.

TODO: Add an overview.
Comment on lines +1 to +3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory does contain the MCO's e2e tests, but a few different types. The tests in https://github.com/openshift/machine-config-operator/tree/main/test/extended & https://github.com/openshift/machine-config-operator/tree/main/test/extended-priv both have disruptive payload tests and many of the tests in the other directories run as presubmits on PRs. I think it would be most helpful to have one overarching README in this directory that details the different types of tests in different sections below.

I think it could be fair for us to let this README merge to give some background on how to run these tests & team MCO can come back and enhance it as a tech debt item.

I can make a tech debt card tomorrow AM, but tentatively I think some of the updates needed are:

  • Running tests from the MCO repo
  • Where to find all the job names
  • Filling in the objective section as you noted
  • Adding details on the other test types

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @isabella-janssen! This README is a starting point to help Node team members (and likely other teams making changes to MCO) run MCO disruptive tests on their PRs. As of today, these are the only tests that restart the node with different kubelet configs. With this Readme in place I can inform my team members to run this test before submitting MCO PRs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of today, these are the only tests that restart the node with different kubelet configs.

Understood, thank you!


# Running MCO Disruptive Tests
Some of the strangest issues are discovered by running MCO disruptive tests. These are long-running tests that do not run automatically on every PR. Currently, some tests reside in origin and some in this repository, though the plan is to consolidate them all within the MCO repo.

You can run these tests using the following methods:

## Periodic Job
Run the `periodic-ci-openshift-machine-config-operator-release-4.21-periodics-e2e-aws-mco-disruptive-techpreview-1of2` job on any PR.

Standard run: `/payload-job periodic-ci-openshift-machine-config-operator-release-4.21-periodics-e2e-aws-mco-disruptive-techpreview-1of2`

Run with a code change: `/payload-job-with-prs periodic-ci-openshift-machine-config-operator-release-4.21-periodics-e2e-aws-mco-disruptive-techpreview-1of2 openshift/origin#30644`

## On Your Own Cluster
1. Create a cluster and export your `KUBECONFIG` (Tested on an Ubuntu VM).

2. Download the correct version of the `oc` client and update your `$PATH` to include it.

3. Clone the `openshift/origin` repository and build it with your changes.

4. Run the tests:

```
./openshift-tests run openshift/machine-config-operator/disruptive \
--shard-count 2 \
--shard-id 1 \
--provider '{"type":"aws","region":"us-west-2","zone":"us-west-2d","multizone":true,"multimaster":true}' \
-o /tmp/logs/artifacts/e2e.log \
--junit-dir /tmp/logs/artifacts/junit
```