Test normal job run log is preferred over legacy one
Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
parent
940bd10a1d
commit
2d21b4624c
2 changed files with 12 additions and 2 deletions
Binary file not shown.
|
|
@ -2039,8 +2039,9 @@ func TestViewRun(t *testing.T) {
|
|||
// ├── 2_cool job with no step logs.txt
|
||||
// ├── 3_sad job with no step logs.txt
|
||||
// ├── -9999999999_legacy cool job with no step logs.txt
|
||||
// └── -9999999999_legacy sad job with no step logs.txt
|
||||
|
||||
// ├── -9999999999_legacy sad job with no step logs.txt
|
||||
// ├── 4_cool job with both legacy and new logs.txt
|
||||
// └── -9999999999_cool job with both legacy and new logs.txt
|
||||
func Test_attachRunLog(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
|
|
@ -2149,6 +2150,15 @@ func Test_attachRunLog(t *testing.T) {
|
|||
wantJobFilename: "-9999999999_legacy cool job with no step logs.txt",
|
||||
wantStepMatch: false,
|
||||
},
|
||||
{
|
||||
name: "matching job name with both normal and legacy filename",
|
||||
job: shared.Job{
|
||||
Name: "cool job with both legacy and new logs",
|
||||
},
|
||||
wantJobMatch: true,
|
||||
wantJobFilename: "4_cool job with both legacy and new logs.txt",
|
||||
wantStepMatch: false,
|
||||
},
|
||||
{
|
||||
name: "one job name is a suffix of another",
|
||||
job: shared.Job{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue