-
Notifications
You must be signed in to change notification settings - Fork 73
tooling: unit tests for CVE feed title parser #155
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
tooling: unit tests for CVE feed title parser #155
Conversation
/cc @tabbysable Any idea if we have GHA enabled on the repo and the action would work? Any way to test the action beforehand? |
/cc 4rivappa fyi! |
@mtardy: GitHub didn't allow me to request PR reviews from the following users: 4rivappa. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
826a161
to
8281467
Compare
This will be useful in the next commit to run unit tests on the function. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
This adds a bunch of simple unit tests and regression tests based on the failures that were found by moving to regex parsing. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
53e1f0a
to
66ccd21
Compare
Fix the following warning appearing on stderr: sig-security/sig-security-tooling/cve-feed/hack/fetch-official-cve-feed.py:68: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). 'updated_at': datetime.utcnow().isoformat(sep='T', timespec='seconds') + 'Z'} Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
66ccd21
to
f5e5c40
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtardy 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 |
So I remove the GHA yaml file to use prow from this kubernetes/test-infra#35426. |
This new job is for running the CVE feed scripts unit tests every time something touches them. The tests were added by kubernetes/sig-security#155.
This is cool! /lgtm |
lol forgot it has to be on its own line |
This new job is for running the CVE feed scripts unit tests every time something touches them. The tests were added by kubernetes/sig-security#155.
I felt like that now that we have this separate function with its own regexes, maybe we should have some unit tests so that we have more confidence over touching that code going on and we can add regression tests if needed. I generated a bunch of them and I think they all make sense even if we have some redundancy.
We could make the code more testable by creating a function accepting the API response and creating the output, thus being able to check more on the API parsing stability.