Print the initial unknown status for all resources before looking at events

This commit is contained in:
Morten Torkildsen
2020-01-02 19:45:10 -08:00
parent e13c26b2f8
commit 7b1a5f85ed
2 changed files with 3 additions and 3 deletions

View File

@@ -138,10 +138,10 @@ func (s *TablePrinter) Print() {
func (s *TablePrinter) PrintUntil(stop <-chan struct{}, interval time.Duration) <-chan struct{} {
completed := make(chan struct{})
setColor(s.out, WHITE)
s.printTable(s.statusInfo.CurrentStatus(), false)
go func() {
defer close(completed)
setColor(s.out, WHITE)
s.printTable(s.statusInfo.CurrentStatus(), false)
ticker := time.NewTicker(interval)
for {
select {

View File

@@ -36,7 +36,7 @@ func TestWaitNoResources(t *testing.T) {
aggStatuses := tableOutput.allAggStatuses()
expectedAggStatuses := []status.Status{
status.CurrentStatus,
status.UnknownStatus,
status.CurrentStatus,
}
if !reflect.DeepEqual(aggStatuses, expectedAggStatuses) {