-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'validate_unversioned_path' option, which is false by default (#53)
* Add 'validate_unversioned_path' option, which is false by default * Update BATS tests to reflect new defaults * Update descriptions and README * Check for argument invalid values in tests * Update description of all_versioned_paths
- Loading branch information
Showing
11 changed files
with
122 additions
and
44 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
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
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
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
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,34 @@ | ||
#!/usr/bin/env bats | ||
|
||
load 'test_fixtures' | ||
|
||
@test "validate_unversioned_path=False" { | ||
export INPUT_VALIDATE_UNVERSIONED_PATH=False | ||
run ${ENTRYPOINT_SH} | ||
refute_output --partial "ERROR" | ||
|
||
run cat ${DOCKER_BATS_WORKDIR}/.entrypoint-run_validator.txt | ||
assert_output "run_validator: ${TEST_MAJOR_RUN_VALIDATOR}" | ||
} | ||
|
||
@test "validate_unversioned_path=True" { | ||
export INPUT_VALIDATE_UNVERSIONED_PATH=True | ||
run ${ENTRYPOINT_SH} | ||
refute_output --partial "ERROR" | ||
|
||
OPTIMADE_VERSION=("v1.0" "v1.0.0") | ||
run cat ${DOCKER_BATS_WORKDIR}/.entrypoint-run_validator.txt | ||
assert_output "run_validator: ${TEST_BASE_RUN_VALIDATOR} | ||
run_validator: ${TEST_MAJOR_RUN_VALIDATOR}" | ||
} | ||
|
||
@test "validate_unversioned_path=invalid_value" { | ||
# For an invalid value, it should fallback to the default (false) | ||
export INPUT_VALIDATE_UNVERSIONED_PATH=invalid_value | ||
run ${ENTRYPOINT_SH} | ||
assert_output --partial "Non-valid input for 'validate unversioned path': ${INPUT_VALIDATE_UNVERSIONED_PATH}. Will use default (false)." | ||
refute_output --partial "ERROR" | ||
|
||
run cat ${DOCKER_BATS_WORKDIR}/.entrypoint-run_validator.txt | ||
assert_output "run_validator: ${TEST_MAJOR_RUN_VALIDATOR}" | ||
} |
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