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

Add CreatedBefore and CreatedAfter Filters for AdminRunsListOptions #916

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

Maed223
Copy link
Contributor

@Maed223 Maed223 commented Jun 13, 2024

Description

Adds CreatedAfter and CreatedBefore Date Time filters for AdminRunsListOptions.

Testing plan

Added Unit tests, but otherwise made a test scripts to test things out as well.

Link to the gist containing the scripts and it's output: https://gist.github.com/Maed223/9e7c5b9a110c0c83a16d7b0eeb389c6b

External links

Output from tests

From added unit tests pointing to local TFE instance.

➜  go-tfe git:(filtering-run-by-date) ✗ go test -run ^TestAdminRuns_ListFilterByDates$
PASS
ok  	github.com/hashicorp/go-tfe	9.649s

Could envision the possibility that these tests are flakey on CI with assertions based on timestamps. I didn't see it in running against my local instance, but I've leave it up to reviewer if there is a better way to go about testing this behavior, or to just omit adding tests for it.

@Maed223 Maed223 force-pushed the filtering-run-by-date branch from 8d61411 to 42cb929 Compare June 17, 2024 15:18
@Maed223 Maed223 changed the title Add CreatedBefore and CreatedAfter Filters for AdminRunsList Add CreatedBefore and CreatedAfter Filters for AdminRunsListOptions Jun 17, 2024
@Maed223 Maed223 force-pushed the filtering-run-by-date branch 2 times, most recently from 0fe3923 to 3b9d946 Compare June 17, 2024 16:15
@Maed223 Maed223 marked this pull request as ready for review June 17, 2024 16:21
@Maed223 Maed223 requested a review from a team as a code owner June 17, 2024 16:21
ctrombley
ctrombley previously approved these changes Jun 17, 2024
ctrombley
ctrombley previously approved these changes Jun 18, 2024
Copy link
Collaborator

@ctrombley ctrombley left a comment

Choose a reason for hiding this comment

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

:shipit:

@Maed223 Maed223 force-pushed the filtering-run-by-date branch from 79e22de to 6128458 Compare June 18, 2024 19:46
@Maed223 Maed223 merged commit 45ad9da into main Jun 18, 2024
7 checks passed
@Maed223 Maed223 deleted the filtering-run-by-date branch June 18, 2024 20:45
Copy link

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

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.

2 participants