GoogleContainerTools / GoogleContainerTools/container-structure-test

Add options for condensing/expanding output when using "text" format

Open
#302 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
2.5k
Forks
212
PR merge metrics
No merged PRs in 30d

Description

When using CST in a CI/CD environment, it would be nice to have multiple options for verbosity of results output. The current "text" format output is informative but noisy in passing cases. Sometimes a "pass-quiet, fail-noisy" option would be nice to have.

I'm still thinking about these, and am certainly open to suggestion, but as conversation starters...I could imagine a few levels of verbosity:

Standard (the current output):
```

=========================================
====== Test file: example-cst.yaml ======
=========================================
=== RUN: File Existence Test: whoami
--- PASS
duration: 0s
=== RUN: File Existence Test: whatami
--- FAIL
duration: 0s
Error: Error examining file in container: Error retrieving file from container: API error (404): Could not find the file /usr/bin/whatami in container 291dffd038c6843ff4e11bfda3f0cbe075e253b9e0756c94359e18137a564ba0
=== RUN: Metadata Test
--- PASS
duration: 0s

=========================================
================ RESULTS ================
=========================================
Passes: 2
Failures: 1
Duration: 0s
Total tests: 3

FAIL

```

Compact:
```
====== Test file: example-cst.yaml ======
.F.

Failures:
File Existence Test: whatami
Error: Error examining file in container: Error retrieving file from container: API error (404): Could not find the file /usr/bin/whatami in container 291dffd038c6843ff4e11bfda3f0cbe075e253b9e0756c94359e18137a564ba0

Passes: 2
Failures: 1
Duration: 0s
Total tests: 3

FAIL
```

Quiet:
```
====== Test file: example-cst.yaml ======
Passes: 2
Failures: 1
Duration: 0s
Total tests: 3

FAIL
```

...and maybe one called "verbose" or "debug" or similar that actually _adds_ info to the current output...like echoing each command run?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.