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 uuid function and unit test #63

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cdituri
Copy link

@cdituri cdituri commented Sep 6, 2024

Adds a provider::assert::uuid() function to use in assertions 🚀 Cheers


PS C:\Go\src\github.com\hashicorp\terraform-provider-assert> go test -v -run "^TestUUID.*" ./...
?       github.com/hashicorp/terraform-provider-assert  [no test files]
=== RUN   TestUUIDFunction
=== PAUSE TestUUIDFunction
=== RUN   TestUUIDFunction_empty_uuid
=== PAUSE TestUUIDFunction_empty_uuid
=== RUN   TestUUIDFunction_falseCases
=== PAUSE TestUUIDFunction_falseCases
=== CONT  TestUUIDFunction
=== CONT  TestUUIDFunction_falseCases
=== CONT  TestUUIDFunction_empty_uuid
--- PASS: TestUUIDFunction_empty_uuid (1.94s)
--- PASS: TestUUIDFunction_falseCases (2.95s)
--- PASS: TestUUIDFunction (3.98s)
PASS
ok      github.com/hashicorp/terraform-provider-assert/internal/provider        (cached)

PS C:\Go\src\github.com\hashicorp\terraform-provider-assert> make test | Select-Object -Last 10
    --- PASS: TestRegexMatchesFunction_falseCases/complex_pattern_with_digit_not_matching (4.98s)
    --- PASS: TestRegexMatchesFunction_falseCases/pattern_with_character_class_not_matching (4.91s)
    --- PASS: TestRegexMatchesFunction_falseCases/pattern_with_non-capturing_group_not_matching (4.17s)
    --- PASS: TestRegexMatchesFunction_falseCases/pattern_with_alternation_not_matching (4.24s)
    --- PASS: TestRegexMatchesFunction_falseCases/pattern_with_optional_group_not_present (3.64s)
--- PASS: TestPositiveFunction_falseCases (13.95s)
--- PASS: TestNegativeFunction_falseCases (13.42s)
PASS
coverage: 89.5% of statements
ok      github.com/hashicorp/terraform-provider-assert/internal/provider        (cached)        coverage: 89.5% of statements

@cdituri cdituri requested a review from a team as a code owner September 6, 2024 23:52
Copy link

hashicorp-cla-app bot commented Sep 6, 2024

CLA assistant check
All committers have signed the CLA.

@bschaatsbergen
Copy link
Member

Hey @cdituri 👋🏼, thank you for submitting this pull request. I’ll review it as soon as possible and get back to you.

Copy link
Author

@cdituri cdituri left a comment

Choose a reason for hiding this comment

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

Swapping out packages for google/uuid makes much sense. Thanks for taking a pass at this PR and polishing things up, @bschaatsbergen. Looks great! 🚀

@github-actions github-actions bot added dependencies Pull requests that update a dependency file new-function Pull requests that update or introduce new functions tests labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file new-function Pull requests that update or introduce new functions tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants