mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
Make warning messages more visible (#7097)
* Wrap warning messages to make them more visible
For example, instead of displaying:
```
⚠ You are using "default" project, odo may not work as expected in the default project.
```
We are now displaying:
```
========================================================================================
⚠ You are using "default" project, odo may not work as expected in the default project.
========================================================================================
```
* Display warning message about default project/namespace in a single block
* Add unit test
* Fix sample outputs for doc automation tests
* Revert "Fix sample outputs for doc automation tests"
This reverts commit 98a6554c34.
* Ignore '===' warning header and footer for doc automation tests
This commit is contained in:
@@ -67,6 +67,9 @@ func StripSpinner(docString string) (returnString string) {
|
||||
if strings.HasPrefix(line, "⚠") && !strings.Contains(line, "Pod is Pending") {
|
||||
continue
|
||||
}
|
||||
if strings.HasPrefix(line, "===") {
|
||||
continue
|
||||
}
|
||||
|
||||
// for some reason, splitting the docString by \n does not split the spinner frames,
|
||||
// so we perform a side operation to remove the extra spinner frames that are not present in the final output
|
||||
|
||||
Reference in New Issue
Block a user