-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #759 from CloudCannon/feat/quiet
Add `--quiet` and `--silent` configuration options when indexing
- Loading branch information
Showing
9 changed files
with
106 additions
and
18 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
3 changes: 3 additions & 0 deletions
3
pagefind/integration_tests/_macros/run_failing.toolproof.macro.yml
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,3 @@ | ||
macro: I run a failing Pagefind | ||
steps: | ||
- I run "%toolproof_process_directory%/target/%pagefind_mode%/pagefind" and expect it to fail |
3 changes: 3 additions & 0 deletions
3
pagefind/integration_tests/_macros/run_failing_with_flags.toolproof.macro.yml
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,3 @@ | ||
macro: I run a failing Pagefind with {flags} | ||
steps: | ||
- I run "%toolproof_process_directory%/target/%pagefind_mode%/pagefind %flags%" and expect it to fail |
15 changes: 15 additions & 0 deletions
15
pagefind/integration_tests/log_levels/error_logs.toolproof.yml
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,15 @@ | ||
name: Log level > error logs | ||
steps: | ||
- step: I have the environment variable "PAGEFIND_SITE" set to "public" | ||
|
||
- macro: I run a failing Pagefind with "--verbose" | ||
- "stdout should contain 'Found 0 files'" | ||
- "stderr should contain 'Error: Pagefind was not able to build an index'" | ||
|
||
- macro: I run a failing Pagefind with "--quiet" | ||
- "stdout should be empty" | ||
- "stderr should contain 'Error: Pagefind was not able to build an index'" | ||
|
||
- macro: I run a failing Pagefind with "--silent" | ||
- "stdout should be empty" | ||
- "stderr should contain 'Error: Pagefind was not able to build an index'" |
26 changes: 26 additions & 0 deletions
26
pagefind/integration_tests/log_levels/success_logs.toolproof.yml
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,26 @@ | ||
name: Log level > success logs | ||
steps: | ||
- step: I have the environment variable "PAGEFIND_SITE" set to "public" | ||
- step: I have a "public/index.html" file with the content {html} | ||
html: >- | ||
<!DOCTYPE html><html lang="en"><head></head><body><p | ||
data-url>Nothing</p></body></html> | ||
- step: I have a "public/cat/index.html" file with the content {html} | ||
html: >- | ||
<!DOCTYPE html><html | ||
lang="en"><head></head><body><h1>world</h1><p data-pagefind-ignore="misc">Hello</p></body></html> | ||
- step: I have a "public/no-lang/index.html" file with the content {html} | ||
html: >- | ||
<!DOCTYPE html><html><head></head><body><h1>world</h1></body></html> | ||
- macro: I run Pagefind with "--verbose" | ||
- "stdout should contain 'unknown: 1 page'" | ||
- 'stderr should contain ''data-pagefind-ignore value of "misc" is not valid''' | ||
|
||
- macro: I run Pagefind with "--quiet && echo done" | ||
- "stdout should be exactly 'done\n'" | ||
- 'stderr should contain ''data-pagefind-ignore value of "misc" is not valid''' | ||
|
||
- macro: I run Pagefind with "--silent && echo complete" | ||
- "stdout should be exactly 'complete\n'" | ||
- stderr should be empty |
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