Skip to content

Conversation

@duanemay
Copy link
Member

The following env vars can be set to control which tests are run
UAA_GRADLE_INT_TEST_COMMAND
UAA_GRADLE_UNIT_TEST_COMMAND

the UAA_DOCKER_ARGS env var can be set to pass additional settings to the docker container

The following env vars can be set to control which tests are run
UAA_GRADLE_INT_TEST_COMMAND
UAA_GRADLE_UNIT_TEST_COMMAND

the UAA_DOCKER_ARGS env var can be set to pass additional settings to the docker container
@github-project-automation github-project-automation bot moved this from Inbox to Pending Merge | Prioritized in Foundational Infrastructure Working Group Oct 16, 2025
@strehle strehle requested a review from Copilot October 16, 2025 14:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds environment variable support to control Gradle test commands and Docker container arguments in the UAA test scripts, enabling developers to run specific tests or configure container settings without modifying the scripts themselves.

  • Introduces UAA_GRADLE_UNIT_TEST_COMMAND and UAA_GRADLE_INT_TEST_COMMAND environment variables to customize which tests are executed
  • Adds UAA_DOCKER_ARGS environment variable to pass additional configuration to Docker containers
  • Updates documentation in all affected scripts to describe the new environment variables

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/unit_tests.sh Replaces hardcoded test command with configurable UAA_GRADLE_UNIT_TEST_COMMAND variable
scripts/integration_tests.sh Replaces hardcoded integrationTest command with configurable UAA_GRADLE_INT_TEST_COMMAND variable
scripts/start_docker_database.sh Adds support for UAA_DOCKER_ARGS to pass additional Docker arguments
run-unit-tests.sh Documents and passes through UAA_DOCKER_ARGS and UAA_GRADLE_UNIT_TEST_COMMAND to container
run-integration-tests.sh Documents and passes through UAA_DOCKER_ARGS and UAA_GRADLE_INT_TEST_COMMAND to container

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

--volume "${script_dir}":"${container_script_dir}" \
--volume "${gradle_lock_dir}" \
--env DB="${DB}" \
${UAA_DOCKER_ARGS:-} \
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The UAA_DOCKER_ARGS variable is expanded without quotes, which could allow command injection if it contains malicious input. Consider validating or sanitizing this variable, or ensure it's only used in trusted environments.

Suggested change
${UAA_DOCKER_ARGS:-} \
"${UAA_DOCKER_ARGS:-}" \

Copilot uses AI. Check for mistakes.
Comment on lines +37 to +38
${UAA_DOCKER_ARGS:-} \
--env UAA_GRADLE_INT_TEST_COMMAND="${UAA_GRADLE_INT_TEST_COMMAND:-integrationTest}" \
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The UAA_DOCKER_ARGS variable is expanded without quotes, which could allow command injection if it contains malicious input. Consider validating or sanitizing this variable, or ensure it's only used in trusted environments.

Copilot uses AI. Check for mistakes.
--publish "${db_port}:${db_port}" \
${DEBUG_MODE:+--publish "5005:5005"} \
${WEB_MODE:+--publish "8080:8080"} \
${UAA_DOCKER_ARGS:-} \
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The UAA_DOCKER_ARGS variable is expanded without quotes, which could allow command injection if it contains malicious input. Consider validating or sanitizing this variable, or ensure it's only used in trusted environments.

Copilot uses AI. Check for mistakes.
@duanemay duanemay merged commit c7fcea4 into develop Oct 16, 2025
33 checks passed
@duanemay duanemay deleted the script_params branch October 16, 2025 14:14
@github-project-automation github-project-automation bot moved this from Pending Merge | Prioritized to Done in Foundational Infrastructure Working Group Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants