Skip to content

Conversation

@ewbankkit
Copy link
Contributor

Closes #2.

Based on https://github.com/hashicorp/terraform-provider-awscc/tree/main/internal/validate.

% go test -v ./int64validator
=== RUN   TestAtLeastValidator
=== PAUSE TestAtLeastValidator
=== RUN   TestAtMostValidator
=== PAUSE TestAtMostValidator
=== RUN   TestBetweenValidator
=== PAUSE TestBetweenValidator
=== CONT  TestAtLeastValidator
=== CONT  TestBetweenValidator
=== RUN   TestAtLeastValidator/valid_integer_as_Int64_min
=== CONT  TestAtMostValidator
=== RUN   TestBetweenValidator/valid_integer_as_Int64_max
=== RUN   TestAtMostValidator/not_an_Int64
=== RUN   TestAtMostValidator/unknown_Int64
=== RUN   TestAtLeastValidator/too_small_integer_as_Int64
=== RUN   TestBetweenValidator/too_small_integer_as_Int64
=== RUN   TestAtMostValidator/null_Int64
=== RUN   TestBetweenValidator/too_large_integer_as_Int64
=== RUN   TestAtLeastValidator/not_an_Int64
=== RUN   TestAtLeastValidator/unknown_Int64
=== RUN   TestAtMostValidator/valid_integer_as_Int64
=== RUN   TestAtLeastValidator/null_Int64
=== RUN   TestBetweenValidator/not_an_Int64
=== RUN   TestAtLeastValidator/valid_integer_as_Int64
=== RUN   TestBetweenValidator/unknown_Int64
--- PASS: TestAtLeastValidator (0.00s)
    --- PASS: TestAtLeastValidator/valid_integer_as_Int64_min (0.00s)
    --- PASS: TestAtLeastValidator/too_small_integer_as_Int64 (0.00s)
    --- PASS: TestAtLeastValidator/not_an_Int64 (0.00s)
    --- PASS: TestAtLeastValidator/unknown_Int64 (0.00s)
    --- PASS: TestAtLeastValidator/null_Int64 (0.00s)
    --- PASS: TestAtLeastValidator/valid_integer_as_Int64 (0.00s)
=== RUN   TestAtMostValidator/valid_integer_as_Int64_min
=== RUN   TestBetweenValidator/null_Int64
=== RUN   TestBetweenValidator/valid_integer_as_Int64
=== RUN   TestAtMostValidator/too_large_integer_as_Int64
=== RUN   TestBetweenValidator/valid_integer_as_Int64_min
--- PASS: TestAtMostValidator (0.00s)
    --- PASS: TestAtMostValidator/not_an_Int64 (0.00s)
    --- PASS: TestAtMostValidator/unknown_Int64 (0.00s)
    --- PASS: TestAtMostValidator/null_Int64 (0.00s)
    --- PASS: TestAtMostValidator/valid_integer_as_Int64 (0.00s)
    --- PASS: TestAtMostValidator/valid_integer_as_Int64_min (0.00s)
    --- PASS: TestAtMostValidator/too_large_integer_as_Int64 (0.00s)
--- PASS: TestBetweenValidator (0.00s)
    --- PASS: TestBetweenValidator/valid_integer_as_Int64_max (0.00s)
    --- PASS: TestBetweenValidator/too_small_integer_as_Int64 (0.00s)
    --- PASS: TestBetweenValidator/too_large_integer_as_Int64 (0.00s)
    --- PASS: TestBetweenValidator/not_an_Int64 (0.00s)
    --- PASS: TestBetweenValidator/unknown_Int64 (0.00s)
    --- PASS: TestBetweenValidator/null_Int64 (0.00s)
    --- PASS: TestBetweenValidator/valid_integer_as_Int64 (0.00s)
    --- PASS: TestBetweenValidator/valid_integer_as_Int64_min (0.00s)
PASS
ok  	github.com/hashicorp/terraform-plugin-framework-validators/int64validator	0.730s

@ewbankkit ewbankkit marked this pull request as ready for review May 24, 2022 17:44
@ewbankkit ewbankkit requested a review from a team as a code owner May 24, 2022 17:44
@bflad bflad self-assigned this May 24, 2022
@bflad bflad added the enhancement New feature or request label May 24, 2022
@bflad bflad added this to the v0.1.0 milestone May 24, 2022
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @ewbankkit! 🚀

@bflad bflad merged commit a772159 into hashicorp:main May 24, 2022
@ewbankkit ewbankkit deleted the f-add-int64-validators branch May 24, 2022 18:58
@bflad bflad added the type/int64 types.Int64 validators label May 25, 2022
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request type/int64 types.Int64 validators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Int64 Amount Validation (AtLeast / AtMost / Between)

2 participants