elastic / elastic/package-spec

Migrate TestValidateIntegrationPolicyTemplates_DataStreamStreams complex cases to test/packages/ fixtures

Open
#1,128 0 comments 0 reactions 1 assignee Claimed by @teresaromero View on GitHub
Dominant language
Go
Stars
20
Forks
93
Avg merge
15h 10m
Merged PRs (30d)
12

Description

## Summary

The complex multi-file package layout test cases inside `TestValidateIntegrationPolicyTemplates_DataStreamStreams` in `code/go/internal/validator/semantic/validate_integration_policy_template_path_test.go` should be migrated to fixture-based validator tests under `test/packages/`, exercised via `code/go/pkg/validator/validator_test.go`.

## Background

Per the repository's semantic-validator testing contract (see `AGENTS.md`): for complex scenarios with multiple files and directories, use test packages in `test/packages/` tested via `validator_test.go`. Simple unit scenarios (single file or small structure) are appropriate for `t.TempDir()` unit tests.

The cases that build multi-file layouts (root manifest, `agent/input`, `data_stream/*/manifest.yml`, `agent/stream` templates) should be extracted into new package fixtures under `test/packages/` with corresponding entries in `validator_test.go` asserting the same expected errors/results.

## Context

- Identified during review of PR #1122 (https://github.com/elastic/package-spec/pull/1122)
- Review comment: https://github.com/elastic/package-spec/pull/1122#discussion_r3000148813
- Requested by: @teresaromero

## Acceptance Criteria

- [ ] Extract integration-level cases from `TestValidateIntegrationPolicyTemplates_DataStreamStreams` into new `test/packages/` fixtures
- [ ] Add corresponding test assertions in `validator_test.go`
- [ ] Keep only simple/single-file unit scenarios in the semantic package test file

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.