github.com/umeshredd/helm@v3.0.0-alpha.1+incompatible/pkg/release/test_run.go (about)

     1  /*
     2  Copyright The Helm Authors.
     3  Licensed under the Apache License, Version 2.0 (the "License");
     4  you may not use this file except in compliance with the License.
     5  You may obtain a copy of the License at
     6  
     7  http://www.apache.org/licenses/LICENSE-2.0
     8  
     9  Unless required by applicable law or agreed to in writing, software
    10  distributed under the License is distributed on an "AS IS" BASIS,
    11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  See the License for the specific language governing permissions and
    13  limitations under the License.
    14  */
    15  
    16  package release
    17  
    18  import "time"
    19  
    20  // TestRunStatus is the status of a test run
    21  type TestRunStatus string
    22  
    23  // Indicates the results of a test run
    24  const (
    25  	TestRunUnknown TestRunStatus = "unknown"
    26  	TestRunSuccess TestRunStatus = "success"
    27  	TestRunFailure TestRunStatus = "failure"
    28  	TestRunRunning TestRunStatus = "running"
    29  )
    30  
    31  // Strng converts a test run status to a printable string
    32  func (x TestRunStatus) String() string { return string(x) }
    33  
    34  // TestRun describes the run of a test
    35  type TestRun struct {
    36  	Name        string        `json:"name,omitempty"`
    37  	Status      TestRunStatus `json:"status,omitempty"`
    38  	Info        string        `json:"info,omitempty"`
    39  	StartedAt   time.Time     `json:"started_at,omitempty"`
    40  	CompletedAt time.Time     `json:"completed_at,omitempty"`
    41  }