Skip to content

test: add tests for custom task id#134

Merged
ripienaar merged 2 commits intochoria-io:mainfrom
msaboor35:test/custom-id
May 27, 2025
Merged

test: add tests for custom task id#134
ripienaar merged 2 commits intochoria-io:mainfrom
msaboor35:test/custom-id

Conversation

@msaboor35
Copy link
Contributor

Tests for #131

The second test fail, if the provided ID has invalid characters, disallowed by NATS subject restrictions. Not sure, if you want to check the validity of ID, if it is provided by the library user. If that is the case, I can remove the 2nd test, and use IsValidName in the CustomIDGenerator in the first test to show the intent that it is the responsibility of the user to check for the validity of the ID.

@ripienaar
Copy link
Member

I think NewTask() should check for valid names yeah as a result of this

@ripienaar ripienaar merged commit 29baa0f into choria-io:main May 27, 2025
2 of 3 checks passed
@msaboor35 msaboor35 deleted the test/custom-id branch May 27, 2025 19:59
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