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

Github Action + functional tests (no *hog tests) #382

Merged
merged 5 commits into from
Feb 16, 2023

Conversation

tsebastiani
Copy link
Collaborator

@tsebastiani tsebastiani commented Feb 3, 2023

Closes #374

This PR introduces the new functional tests GitHub Action on a disposable OpenShift instance 4.x leveraging the crc-cloud project created on purpose.
The GitHub action is triggered by commenting a pull request with the keyword /test (the keyword can be changed) and to make it work must be first merged in the main branch.
The action will instantiate and dispose a fully functional OpenShift instance on AWS. The action will checkout the last commit in the PR branch from which the comment is added and the OpenShift instance will be disposed even if an error is encountered during the test run.
The following tests are actually executed;

Name
test_app_outages_gh
test_container
test_namespace
test_net_chaos
test_time

The following secrets must be created in the repository :

Secret Description
AWS_ACCESS_KEY_ID AWS access key ID
AWS_SECRET_ACCESS_KEY AWS secret access key
KUBEADMIN_PWD password for the kubeadmin account in the newly created OpenShift Instance
DEVELOPER_PWD password for the developer account in the newly created OpenShift Instance
REDHAT_PWD password for the redhat account in the newly created OpenShift Instance
PULL_SECRET a base64 encoded pull secret that can be downloaded from here after registrating or logging in with a RedHat account

The Action will produce a test report containing the Passed/Failed tests and the code coverage in the action summary. From my experiments the full run takes approximately 23 minutes.

@paigerube14
Copy link
Collaborator

Have you added the secrets to this main github page already? We might want to merge the workflow and then the code changes separately to be able to run the workflow against the test changes. Thoughts?

@tsebastiani
Copy link
Collaborator Author

tsebastiani commented Feb 3, 2023

Have you added the secrets to this main github page already? We might want to merge the workflow and then the code changes separately to be able to run the workflow against the test changes. Thoughts?

Paige regarding the AWS credentials and the pull secret we should ask to the management to provide us them, regarding the passwords instead we can simply generate them randomly and they will work, anyway I'm afraid that I don't have the grants to set them in the krkn repo :-\ @chaitanyaenr can you check?

@chaitanyaenr
Copy link
Collaborator

@tsebastiani sent you an invite, do let me know if it allows you to add secrets to the project. Thanks.

@tsebastiani
Copy link
Collaborator Author

@tsebastiani sent you an invite, do let me know if it allows you to add secrets to the project. Thanks.

I can access some settings, but not the actions and secret section apparently.

Copy link
Collaborator

@paigerube14 paigerube14 left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Collaborator

@chaitanyaenr chaitanyaenr left a comment

Choose a reason for hiding this comment

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

LGTM

@chaitanyaenr
Copy link
Collaborator

we can merge it in once rebased. Thanks.

@tsebastiani tsebastiani merged commit 8b18fa8 into krkn-chaos:main Feb 16, 2023
@tsebastiani tsebastiani deleted the redhat-chaos/krkn#374 branch August 23, 2023 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disposable CRC for running functional tests
3 participants