Skip to content

Conversation

@efd6
Copy link
Contributor

@efd6 efd6 commented Oct 21, 2025

This adds script testing for data streams. This is the MVP, future versions can be generalised to operate on input packages.

The current implementation supports:

  • pipeline testing
  • system testing
  • package upgrade testing (only to latest, not to arbitrary versions)
  • shared stack
  • independent stack
  • docker services

Not supported:

  • test coverage
  • report output configuration
  • k8s services
  • tf services (ish, these can be shimmed via docker)

Depends on a v3.5.1 of package-spec (currently shimmed in via a go.mod replace directive, to be removed)

Please take a look.

@efd6 efd6 self-assigned this Oct 21, 2025
@efd6 efd6 added the enhancement New feature or request label Oct 21, 2025
@efd6 efd6 force-pushed the script_tests branch 5 times, most recently from 411a39e to bc55805 Compare October 21, 2025 04:31
@efd6
Copy link
Contributor Author

efd6 commented Oct 21, 2025

/test

@efd6 efd6 force-pushed the script_tests branch 2 times, most recently from d9e0c1a to 8433c67 Compare October 21, 2025 20:16
@efd6 efd6 marked this pull request as ready for review October 21, 2025 21:09
@efd6 efd6 requested a review from a team as a code owner October 21, 2025 21:09
test-check-packages-other:
PACKAGE_TEST_TYPE=other ./scripts/test-check-packages.sh

test-check-packages-independent-script:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This does not appear to run in the CI, but it's entirely unclear how to achieve that.

Copy link
Contributor

Choose a reason for hiding this comment

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

In order to be executed in the CI, it needs to be updated this shell script that generates dynamically all the Buildkite steps to be executed:

https://github.com/elastic/elastic-package/blob/d5f73ab15af1dcf3547ed789f8ad4631257f4197/.buildkite/pipeline.trigger.integration.tests.sh

Depending on how it is required to launch these steps, all packages in one step or each package in its own CI step, it would be needed to do different modifications:

  • all packages in one step:
  • each package in its own CI step:
    • it would be needed to duplicate this code for the new Makefile target name
    • for instance, for packages under parallel folder:
      pushd test/packages/parallel > /dev/null
      while IFS= read -r -d '' package ; do
      package_name=$(basename "${package}")
      echo " - label: \":go: Integration test: ${package_name}\""
      echo " key: \"integration-parallel-${package_name}-agent\""
      echo " command: ./.buildkite/scripts/integration_tests.sh -t test-check-packages-parallel -p ${package_name}"
      echo " env:"
      echo " UPLOAD_SAFE_LOGS: 1"
      echo " agents:"
      echo " provider: \"gcp\""
      echo " image: \"${UBUNTU_X86_64_AGENT_IMAGE}\""
      echo " plugins:"
      echo " # See https://github.com/elastic/oblt-infra/blob/main/conf/resources/repos/integrations/01-gcp-buildkite-oidc.tf"
      echo " # This plugin authenticates to Google Cloud using the OIDC token."
      echo " - elastic/oblt-google-auth#v1.2.0:"
      echo " lifetime: 10800 # seconds"
      echo " project-id: \"elastic-observability-ci\""
      echo " project-number: \"911195782929\""
      echo " artifact_paths:"
      echo " - build/test-results/*.xml"
      echo " - build/test-coverage/coverage-*.xml" # these files should not be used to compute the final coverage of elastic-package
      done < <(find . -maxdepth 1 -mindepth 1 -type d -print0)

return cmd
}

func testRunnerScriptCommandAction(cmd *cobra.Command, args []string) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The logic in this function is rudimentary and only intended to allow an MVP to be demonstrated. In order to be able to render reports and redirect to file output this needs enhancement.

@efd6 efd6 requested a review from andrewkroh October 21, 2025 21:14
@jsoriano jsoriano self-requested a review October 23, 2025 08:34
@efd6 efd6 force-pushed the script_tests branch 3 times, most recently from c5e6b61 to 7f4815f Compare October 28, 2025 05:46
@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 28, 2025

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @efd6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants