github.com/kubeshop/testkube@v1.17.23/pkg/api/v1/testkube/model_executions_result_extended.go (about)

     1  package testkube
     2  
     3  func (result ExecutionsResult) Table() (header []string, output [][]string) {
     4  	header = []string{"ID", "Name", "Test Name", "Type", "Status", "Labels"}
     5  
     6  	for _, e := range result.Results {
     7  		var status string
     8  		if e.Status != nil {
     9  			status = string(*e.Status)
    10  		}
    11  		output = append(output, []string{
    12  			e.Id,
    13  			e.Name,
    14  			e.TestName,
    15  			e.TestType,
    16  			status,
    17  			MapToString(e.Labels),
    18  		})
    19  	}
    20  
    21  	return
    22  }