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

test: Add tests for config.ts and parser.ts #186

Merged
merged 2 commits into from
Nov 22, 2022

Conversation

SamoKopecky
Copy link
Member

@SamoKopecky SamoKopecky commented Nov 9, 2022

Part of #176

Create tests for the functions in the helpers folder.

@sesheta sesheta added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 9, 2022
@sesheta
Copy link
Member

sesheta commented Nov 9, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@sesheta sesheta added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 9, 2022
@SamoKopecky SamoKopecky force-pushed the backend-tests branch 2 times, most recently from d7b6edd to ade12b1 Compare November 9, 2022 21:28
plugins/rhacm-backend/src/helpers/config.test.ts Outdated Show resolved Hide resolved
plugins/rhacm-backend/src/helpers/config.test.ts Outdated Show resolved Hide resolved
plugins/rhacm-backend/src/helpers/parser.test.ts Outdated Show resolved Hide resolved
@tumido
Copy link
Member

tumido commented Nov 10, 2022

I think this is a good start 🙂 You just need to think more defensively about what the language does for you and how it limits you. 🙂

@sesheta sesheta added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 16, 2022
@SamoKopecky SamoKopecky marked this pull request as ready for review November 16, 2022 16:28
@sesheta sesheta removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 16, 2022
@SamoKopecky
Copy link
Member Author

SamoKopecky commented Nov 16, 2022

Thanks for the feedback it is ready for review now.

I also added a separate parser for resources (parseResources) to parser.ts since it allows us to test the overall parsing functionality better. This function also lets us define an undefined state for the individual resource properties when the resources information is not available from the API response. I am not sure if this fits together with the tests PR or whether I should create a new PR for it.

@SamoKopecky SamoKopecky requested a review from tumido November 16, 2022 16:28
Copy link
Member

@tumido tumido left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@sesheta sesheta added the lgtm Indicates that a PR is ready to be merged. label Nov 22, 2022
@sesheta
Copy link
Member

sesheta commented Nov 22, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tumido

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sesheta sesheta added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2022
@sesheta sesheta removed the lgtm Indicates that a PR is ready to be merged. label Nov 22, 2022
@tumido
Copy link
Member

tumido commented Nov 22, 2022

/lgtm

@sesheta sesheta added the lgtm Indicates that a PR is ready to be merged. label Nov 22, 2022
@tumido
Copy link
Member

tumido commented Nov 22, 2022

I love this, good job on this one! 👍

@sesheta sesheta merged commit 35c4ff6 into operate-first:main Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants