- 
                Notifications
    You must be signed in to change notification settings 
- Fork 129
internal/testrunner/script: add script testing package #3012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
411a39e    to
    bc55805      
    Compare
  
    | /test | 
d9e0c1a    to
    8433c67      
    Compare
  
    | test-check-packages-other: | ||
| PACKAGE_TEST_TYPE=other ./scripts/test-check-packages.sh | ||
|  | ||
| test-check-packages-independent-script: | 
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
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:
- similar to with-kindorotherCI step (Buildkite link)
- it should be added a new element (Makefile target name) to this list:
 elastic-package/.buildkite/pipeline.trigger.integration.tests.sh Lines 42 to 47 in d5f73ab CHECK_PACKAGES_TESTS=( test-check-packages-other test-check-packages-with-kind test-check-packages-with-custom-agent test-check-packages-benchmarks ) 
 
- similar to 
- 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 parallelfolder:
 elastic-package/.buildkite/pipeline.trigger.integration.tests.sh Lines 117 to 138 in d5f73ab 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 { | 
There was a problem hiding this comment.
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.
c5e6b61    to
    7f4815f      
    Compare
  
    | 💛 Build succeeded, but was flaky
 Failed CI StepsHistory
 cc @efd6 | 
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:
Not supported:
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.