Skip to content

Commit

Permalink
Use test config in tests #24
Browse files Browse the repository at this point in the history
Use a specific test configuration file when running tests, so that the configuration is part of the tests.
  • Loading branch information
tenstad committed Mar 23, 2022
1 parent 8b13e51 commit 2a36683
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TEMP_DIR=$(mktemp -d -t crd-ref-docs-XXXXX)
DEFAULT_ARGS=(--log-level=ERROR --source-path="${SCRIPT_DIR}/test" --output-path="${TEMP_DIR}/out")
DEFAULT_ARGS=(--log-level=ERROR --source-path="${SCRIPT_DIR}/test" --output-path="${TEMP_DIR}/out" --config="${SCRIPT_DIR}/test/config.yaml")

trap '[[ $TEMP_DIR ]] && rm -rf "$TEMP_DIR"' EXIT

Expand Down
2 changes: 1 addition & 1 deletion test/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ processor:
- "TypeMeta$"

render:
kubernetesVersion: 1.18
kubernetesVersion: 1.22
2 changes: 0 additions & 2 deletions test/expected.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ GuestbookSpec defines the desired state of Guestbook.
|===




[id="{anchor_prefix}-github-com-elastic-crd-ref-docs-api-v1-rating"]
==== Rating (string)

Expand Down
2 changes: 0 additions & 2 deletions test/expected.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ _Appears in:_
| `headers` _[GuestbookHeader](#guestbookheader) array_ | Headers contains a list of header items to include in the page |




#### Rating

_Underlying type:_ `string`
Expand Down

0 comments on commit 2a36683

Please sign in to comment.