Skip to content

TestDataGenerator randomFieldName and randomDomainName usage of ValidateDomainAndFieldNamesAction#6859

Merged
cnathe merged 18 commits intodevelopfrom
fb_testDataGen258
Jul 22, 2025
Merged

TestDataGenerator randomFieldName and randomDomainName usage of ValidateDomainAndFieldNamesAction#6859
cnathe merged 18 commits intodevelopfrom
fb_testDataGen258

Conversation

@cnathe
Copy link
Contributor

@cnathe cnathe commented Jul 18, 2025

Rationale

We've been slowly handling various cases on the test code side to account for randomly generated domain and field names that end up being invalid (because of invalid character sequences, length, etc.). This PR changes that approach so that we instead call a server API (ValidateDomainAndFieldNamesAction) to do those checks on the generated name and regenerate the name if it is invalid.

Related Pull Requests

Changes

  • PropertyController.ValidateDomainAndFieldNameAction and usage in TestDataGenerator.randomFieldName and randomDomainName
  • Add DomainKind.validateDomainName to consolidate some of the duplicate checks in various domainKinds
  • Update usages of randomFieldName to pass DomainKind

@cnathe cnathe requested a review from labkey-klum July 22, 2025 13:16
*/
@Test
public void testIssue454644() throws Exception
public void testIssue45664() throws Exception
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it's not actually from this PR, but I don't love test names like this that are not mnemonic.

@cnathe cnathe removed request for XingY and labkey-klum July 22, 2025 13:58
… and continue error check in ValidateDomainAndFieldNamesAction
@cnathe cnathe merged commit 99beaa2 into develop Jul 22, 2025
8 of 11 checks passed
@cnathe cnathe deleted the fb_testDataGen258 branch July 22, 2025 16:05
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