Skip to content

Commit

Permalink
update json keys for test suite payload (#70)
Browse files Browse the repository at this point in the history
* update json keys for test suite payload

* fixed unit test cases
  • Loading branch information
palashmarantas authored Mar 22, 2022
1 parent df384bb commit 79899b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/core/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ type TestSuitePayload struct {
SuiteID string `json:"suiteID"`
SuiteName string `json:"suiteName"`
ParentSuiteID string `json:"parentSuiteID"`
BlacklistSource string `json:"blacklistSource"`
Blacklisted bool `json:"blacklist"`
BlocklistSource string `json:"blocklistSource"`
Blocklisted bool `json:"blocklist"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration int `json:"duration"`
Expand Down
4 changes: 2 additions & 2 deletions pkg/service/teststats/teststats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func TestProcStats_appendStatsToTestSuites(t *testing.T) {
{SuiteID: "testSuite1", StartTime: timeMap["tpast1"], EndTime: timeMap["tfuture1"]},
},
[]*procfs.Stats{}},
"[{SuiteID:testSuite1 SuiteName: ParentSuiteID: BlacklistSource: Blacklisted:false StartTime:2021-02-22 16:23:01 +0000 UTC EndTime:2021-02-22 16:23:01 +0000 UTC Duration:0 Status: Stats:[]}]",
"[{SuiteID:testSuite1 SuiteName: ParentSuiteID: BlocklistSource: Blocklisted:false StartTime:2021-02-22 16:23:01 +0000 UTC EndTime:2021-02-22 16:23:01 +0000 UTC Duration:0 Status: Stats:[]}]",
},

{"Test appendStatsToTests",
Expand Down Expand Up @@ -296,7 +296,7 @@ func TestProcStats_appendStatsToTestSuites(t *testing.T) {
},
},
},
"[{SuiteID:testSuite2 SuiteName: ParentSuiteID: BlacklistSource: Blacklisted:false StartTime:2021-02-22 16:23:01 +0000 UTC EndTime:2021-02-22 16:23:01.1 +0000 UTC Duration:100 Status: Stats:[{Memory:131 CPU:1.2 Storage:0 RecordTime:2021-02-22 16:23:01 +0000 UTC}]} {SuiteID:testSuite3 SuiteName: ParentSuiteID: BlacklistSource: Blacklisted:false StartTime:2021-02-22 16:22:05 +0000 UTC EndTime:2021-02-22 16:22:05.2 +0000 UTC Duration:200 Status: Stats:[{Memory:100 CPU:25.4 Storage:250 RecordTime:2021-02-22 16:22:05 +0000 UTC}]}]",
"[{SuiteID:testSuite2 SuiteName: ParentSuiteID: BlocklistSource: Blocklisted:false StartTime:2021-02-22 16:23:01 +0000 UTC EndTime:2021-02-22 16:23:01.1 +0000 UTC Duration:100 Status: Stats:[{Memory:131 CPU:1.2 Storage:0 RecordTime:2021-02-22 16:23:01 +0000 UTC}]} {SuiteID:testSuite3 SuiteName: ParentSuiteID: BlocklistSource: Blocklisted:false StartTime:2021-02-22 16:22:05 +0000 UTC EndTime:2021-02-22 16:22:05.2 +0000 UTC Duration:200 Status: Stats:[{Memory:100 CPU:25.4 Storage:250 RecordTime:2021-02-22 16:22:05 +0000 UTC}]}]",
},
}
for _, tt := range tests {
Expand Down

0 comments on commit 79899b3

Please sign in to comment.