databricks-cli/integration/bundle
Anton Nekipelov 3aef065c5c
Refactor TestSparkJarTask* tests to support test environments without Java 8 (#2385)
## Changes
1. Refactored `TestSparkJarTaskDeployAndRunOnVolumes` and
`TestSparkJarTaskDeployAndRunOnWorkspace` to use a table-driven approach
for better organization of similar tests
2. Implemented `testutil.HasJDK()` to replace `testutil.RequireJDK` to
be able to skip tests
3. Ensured the test suite properly fails if no compatible Java version
is found

## Why
It can be tricky to have Java 8 installed on modern dev environments
(e.g. Mac on Apple M3 chip). The absence of which previously caused the
Spark Jar task tests to fail when run locally. This refactoring allows
such environments to be able to run "SparkJar" tests using a newer
Databricks Runtime.

## Tests
1. Ran `TestSparkJarTaskDeployAndRunOnVolumes` and
`TestSparkJarTaskDeployAndRunOnWorkspace` locally on Mac with Java11
installed.
2. Checked that tests against older runtimes are still being run and
passing in CI/CD environments
2025-02-28 08:39:21 +00:00
..
bundles Update app deploy test to confirm app config changes on redeploy (#2301) 2025-02-07 14:54:24 +00:00
testdata Set default data_security_mode to "SINGLE_USER" in bundle templates (#2372) 2025-02-26 13:19:38 +01:00
apps_test.go Update app deploy test to confirm app config changes on redeploy (#2301) 2025-02-07 14:54:24 +00:00
artifacts_test.go Remove bundle.{Seq,If,Defer,newPhase,logString}, switch to regular functions (#2390) 2025-02-27 11:41:58 +00:00
basic_test.go Added support for double underscore variable references (#2203) 2025-01-29 13:38:28 +00:00
bind_resource_test.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
clusters_test.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
dashboards_test.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
deploy_test.go Enable testifylint and fix the issues (#2065) 2025-01-02 12:03:41 +01:00
deploy_then_remove_resources_test.go Move integration test helpers to `integration/internal` (#2022) 2024-12-17 08:45:58 +01:00
deploy_to_shared_test.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
deployment_state_test.go Move integration test helpers to `integration/internal` (#2022) 2024-12-17 08:45:58 +01:00
destroy_test.go Enable testifylint and fix the issues (#2065) 2025-01-02 12:03:41 +01:00
empty_bundle_test.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
environments_test.go Move integration test helpers to `integration/internal` (#2022) 2024-12-17 08:45:58 +01:00
generate_job_test.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
generate_pipeline_test.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
helpers_test.go Refactor `bundle init` (#2074) 2025-01-20 12:09:28 +00:00
init_default_python_test.go Fix failing integration test due to lowercased wheel file (#2380) 2025-02-25 17:31:57 +00:00
init_test.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
job_metadata_test.go Move integration test helpers to `integration/internal` (#2022) 2024-12-17 08:45:58 +01:00
local_state_staleness_test.go Move integration test helpers to `integration/internal` (#2022) 2024-12-17 08:45:58 +01:00
python_wheel_test.go Remove superfluous helper (#2028) 2024-12-17 17:34:09 +00:00
spark_jar_test.go Refactor TestSparkJarTask* tests to support test environments without Java 8 (#2385) 2025-02-28 08:39:21 +00:00
validate_test.go Remove calls to `testutil.GetEnvOrSkipTest(t, "CLOUD_ENV")` (#2014) 2024-12-13 16:09:51 +00:00