This repository has been archived by the owner on Feb 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: set defaults for SparkConfiguration, add tests (#606)
* add SparkConfiguration tests * change test directory structure
- Loading branch information
Showing
5 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from aztk.spark.models import SparkConfiguration | ||
from aztk.error import InvalidModelError | ||
|
||
|
||
def test_spark_configuration_defaults(): | ||
spark_configuration = SparkConfiguration() | ||
spark_configuration.validate() | ||
|
||
assert spark_configuration.spark_defaults_conf is None | ||
assert spark_configuration.spark_defaults_conf is None | ||
assert spark_configuration.spark_defaults_conf is None | ||
|
||
def test_spark_configuration_fields(): | ||
spark_configuration = SparkConfiguration( | ||
spark_defaults_conf="spark-defaults.conf", | ||
spark_env_sh="spark-env.sh", | ||
core_site_xml="core-site.xml", | ||
) | ||
spark_configuration.validate() | ||
|
||
assert spark_configuration.spark_defaults_conf == "spark-defaults.conf" | ||
assert spark_configuration.spark_env_sh == "spark-env.sh" | ||
assert spark_configuration.core_site_xml == "core-site.xml" |