Skip to content

[AV-132306] Add app service and endpoint validator acceptance coverage#616

Merged
Talina06 merged 13 commits into
mainfrom
AV-132306-add-acceptance-coverage-for-app-service-endpoint-validators
May 28, 2026
Merged

[AV-132306] Add app service and endpoint validator acceptance coverage#616
Talina06 merged 13 commits into
mainfrom
AV-132306-add-acceptance-coverage-for-app-service-endpoint-validators

Conversation

@nimiyajoseph

@nimiyajoseph nimiyajoseph commented May 26, 2026

Copy link
Copy Markdown
Contributor

Jira

Description

Add local Terraform validation coverage for App Endpoint and App Service validator matrix scenarios, including hidden cases where hand-written validators prevented generated OpenAPI enum validators from running.

Total tests added: 9 validation scenarios
New top-level acceptance tests: 8
Additional negative validation steps added/tightened: 2

This PR expands acceptance coverage for App Endpoint and App Service validation behavior and fixes schema wiring so generated OpenAPI validators run where expected.

Changes include:

  • Added local validation for App Endpoint activation status so only Online and Offline are accepted.
  • Removed manual LengthAtLeast(1) validators from App Endpoint logging log_level and App Service log streaming output_type so generated enum validators attach correctly.
  • Added/tightened validation coverage for:
  • invalid App Endpoint activation state
  • empty standalone App Endpoint CORS origin
  • invalid App Endpoint logging log_level
  • invalid App Service log streaming activation state
  • invalid App Service log streaming output_type
  • multiple App Service log streaming credential blocks
  • App Service name longer than the generated max length

New top-level acceptance tests:

  1. TestAccAppEndpointActivationStatusInvalidState
  2. TestAccAppEndpointCorsResourceEmptyOrigin
  3. TestAccAppServiceLogStreamingInvalidOutputType
  4. TestAccAppServiceLogStreamingMultipleCredentials
  5. TestAccAppServiceResourceNameTooLong
  6. TestAccAppServiceLogStreamingActivationStatusInvalidUUIDs
  7. TestAccAppServiceLogStreamingDatasourceInvalidUUIDs

Additional validation scenarios added/tightened inside existing flows:

  1. App Endpoint logging invalid log_level = "debug" now expects a local generated enum diagnostic.
  2. App Service log streaming activation invalid [state = "disabled"] now validates locally and restores to a valid state afterward.

What changed:

  • Added requiredNonEmptyStringAttribute() in attributes.go for required IDs that are not UUID-formatted.
  • Updated bucket_id in backup_schedule_schema.go to use non-empty string validation instead of UUID validation.
  • Updated bucket_id in collection_schema.go the same way, since that was the other non-hierarchical bucket_id using the UUID helper.
  • Updated project_acceptance_test.go so TestAccProjectInvalidResource expects the new local UUID validation error for organization_id = "abc-def".

This should address:

  • TestAccProjectInvalidResource
  • TestAccBackupScheduleResourceInvalidDayOfWeek
  • TestAccBackupScheduleResourceInvalidRetention
  • TestAccBackupScheduleResourceInvalidStartAt

Type of Change

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • This change updates the ci/cd workflow.
  • Documentation fix/enhancement.

Manual Testing Approach

How was this change tested and do you have evidence? (REQUIRED: Select at least 1)

  • Manually tested
  • Unit tested
  • Acceptance tested
  • Unable to test / will not test (Please provide comments in section below)

Testing

Testing

Further comments

@nimiyajoseph nimiyajoseph requested a review from a team as a code owner May 26, 2026 07:39
Copilot AI review requested due to automatic review settings May 26, 2026 07:39
@github-actions

Copy link
Copy Markdown

No PR template selections were detected. Please make sure to fill out the PR template properly by selecting the appropriate checkboxes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@factory-droid

factory-droid Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Droid finished @nimiyajoseph's task —— View job


@github-actions github-actions Bot added the bug Something isn't working label May 26, 2026
Comment thread acceptance_tests/app_endpoint_activation_status_acceptance_test.go
Comment thread acceptance_tests/app_endpoint_cors_acceptance_test.go
Comment thread acceptance_tests/app_endpoint_activation_status_acceptance_test.go

@factory-droid factory-droid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I validated all candidates and approved three actionable issues: two new negative tests can fail before hitting their intended validators due to uninitialized shared app-endpoint IDs, and one new regex is incompatible with stringvalidator.OneOf diagnostic ordering. These are concrete, reproducible test-correctness bugs with valid anchors in the PR diff.

@nimiyajoseph nimiyajoseph marked this pull request as draft May 26, 2026 11:40
@nimiyajoseph nimiyajoseph marked this pull request as ready for review May 27, 2026 12:31
@factory-droid

factory-droid Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Droid finished @nimiyajoseph's task —— View job


@factory-droid factory-droid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Validation completed: one candidate was approved as a concrete, actionable issue; details were written to review_validated.json.

@nimiyajoseph nimiyajoseph self-assigned this May 27, 2026
nidhi07kumar
nidhi07kumar previously approved these changes May 28, 2026
@Talina06 Talina06 force-pushed the AV-132306-add-acceptance-coverage-for-app-service-endpoint-validators branch from 9832d3d to 1720263 Compare May 28, 2026 19:43
…ouchbase-capella into AV-132306-add-acceptance-coverage-for-app-service-endpoint-validators
@Talina06 Talina06 merged commit 7beef36 into main May 28, 2026
11 of 12 checks passed
@Talina06 Talina06 deleted the AV-132306-add-acceptance-coverage-for-app-service-endpoint-validators branch May 28, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working needs-triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants