-
Notifications
You must be signed in to change notification settings - Fork 587
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add testing for bubbletea component event handlers
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
- Loading branch information
Showing
49 changed files
with
1,735 additions
and
137 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
19 changes: 19 additions & 0 deletions
19
cmd/syft/cli/ui/__snapshots__/handle_attestation_test.snap
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,19 @@ | ||
|
||
[TestHandler_handleAttestationStarted/attesting_in_progress/task_line - 1] | ||
⠋ Creating a thing running a thing | ||
--- | ||
|
||
[TestHandler_handleAttestationStarted/attesting_in_progress/log - 1] | ||
░░ contents | ||
░░ of | ||
░░ stuff! | ||
|
||
--- | ||
|
||
[TestHandler_handleAttestationStarted/attesting_complete/task_line - 1] | ||
✔ Created a thing running a thing | ||
--- | ||
|
||
[TestHandler_handleAttestationStarted/attesting_complete/log - 1] | ||
|
||
--- |
16 changes: 16 additions & 0 deletions
16
cmd/syft/cli/ui/__snapshots__/handle_cataloger_task_test.snap
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,16 @@ | ||
|
||
[TestHandler_handleCatalogerTaskStarted/cataloging_task_in_progress - 1] | ||
some task title [some value] | ||
--- | ||
|
||
[TestHandler_handleCatalogerTaskStarted/cataloging_sub_task_in_progress - 1] | ||
└── some task title [some value] | ||
--- | ||
|
||
[TestHandler_handleCatalogerTaskStarted/cataloging_sub_task_complete - 1] | ||
✔ └── some task done [some value] | ||
--- | ||
|
||
[TestHandler_handleCatalogerTaskStarted/cataloging_sub_task_complete_with_removal - 1] | ||
|
||
--- |
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,8 @@ | ||
|
||
[TestHandler_handleFetchImage/fetch_image_in_progress - 1] | ||
⠋ Loading image ━━━━━━━━━━━━━━━━━━━━ [current] the-image | ||
--- | ||
|
||
[TestHandler_handleFetchImage/fetch_image_complete - 1] | ||
✔ Loaded image the-image | ||
--- |
8 changes: 8 additions & 0 deletions
8
cmd/syft/cli/ui/__snapshots__/handle_file_digests_cataloger_test.snap
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,8 @@ | ||
|
||
[TestHandler_handleFileDigestsCatalogerStarted/cataloging_in_progress - 1] | ||
⠋ Cataloging file digests ━━━━━━━━━━━━━━━━━━━━ [current] | ||
--- | ||
|
||
[TestHandler_handleFileDigestsCatalogerStarted/cataloging_complete - 1] | ||
✔ Cataloged file digests | ||
--- |
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,8 @@ | ||
|
||
[TestHandler_handleFileIndexingStarted/cataloging_in_progress - 1] | ||
⠋ Indexing file system ━━━━━━━━━━━━━━━━━━━━ [current] /some/path | ||
--- | ||
|
||
[TestHandler_handleFileIndexingStarted/cataloging_complete - 1] | ||
✔ Indexed file system /some/path | ||
--- |
8 changes: 8 additions & 0 deletions
8
cmd/syft/cli/ui/__snapshots__/handle_file_metadata_cataloger_test.snap
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,8 @@ | ||
|
||
[TestHandler_handleFileMetadataCatalogerStarted/cataloging_in_progress - 1] | ||
⠋ Cataloging file metadata ━━━━━━━━━━━━━━━━━━━━ [current] | ||
--- | ||
|
||
[TestHandler_handleFileMetadataCatalogerStarted/cataloging_complete - 1] | ||
✔ Cataloged file metadata | ||
--- |
16 changes: 16 additions & 0 deletions
16
cmd/syft/cli/ui/__snapshots__/handle_package_cataloger_test.snap
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,16 @@ | ||
|
||
[TestHandler_handlePackageCatalogerStarted/cataloging_in_progress - 1] | ||
⠋ Cataloging packages [50 packages] | ||
--- | ||
|
||
[TestHandler_handlePackageCatalogerStarted/cataloging_only_files_complete - 1] | ||
⠋ Cataloging packages [50 packages] | ||
--- | ||
|
||
[TestHandler_handlePackageCatalogerStarted/cataloging_only_packages_complete - 1] | ||
⠋ Cataloging packages [100 packages] | ||
--- | ||
|
||
[TestHandler_handlePackageCatalogerStarted/cataloging_complete - 1] | ||
✔ Cataloged packages [100 packages] | ||
--- |
12 changes: 12 additions & 0 deletions
12
cmd/syft/cli/ui/__snapshots__/handle_pull_docker_image_test.snap
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,12 @@ | ||
|
||
[Test_dockerPullStatusFormatter_Render/pulling - 1] | ||
3 Layers▕▅▃ ▏[12 B / 30 B] | ||
--- | ||
|
||
[Test_dockerPullStatusFormatter_Render/download_complete - 1] | ||
3 Layers▕█▃ ▏[30 B] Extracting... | ||
--- | ||
|
||
[Test_dockerPullStatusFormatter_Render/complete - 1] | ||
3 Layers▕███▏[30 B] Extracting... | ||
--- |
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,8 @@ | ||
|
||
[TestHandler_handleReadImage/read_image_in_progress - 1] | ||
⠋ Parsing image ━━━━━━━━━━━━━━━━━━━━ id | ||
--- | ||
|
||
[TestHandler_handleReadImage/read_image_complete - 1] | ||
✔ Parsed image id | ||
--- |
8 changes: 8 additions & 0 deletions
8
cmd/syft/cli/ui/__snapshots__/handle_secrets_cataloger_test.snap
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,8 @@ | ||
|
||
[TestHandler_handleSecretsCatalogerStarted/cataloging_in_progress - 1] | ||
⠋ Cataloging secrets ━━━━━━━━━━━━━━━━━━━━ [64 secrets] | ||
--- | ||
|
||
[TestHandler_handleSecretsCatalogerStarted/cataloging_complete - 1] | ||
✔ Cataloged secrets [64 secrets] | ||
--- |
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
Oops, something went wrong.