@@ -8,8 +8,8 @@ package runs
88import (
99 "testing"
1010
11- "github.com/galasa-dev/cli/pkg/runsformatter"
1211 "github.com/galasa-dev/cli/pkg/galasaapi"
12+ "github.com/galasa-dev/cli/pkg/runsformatter"
1313 "github.com/stretchr/testify/assert"
1414)
1515
@@ -31,14 +31,13 @@ func CreateMethod(methodName string,
3131 return method
3232}
3333
34-
3534func createRunForConverter (
3635 runName string ,
3736 testName string ,
3837 requestor string ,
3938 status string ,
4039 result string ,
41- queued string ,
40+ queued string ,
4241 methods []galasaapi.TestMethod ) galasaapi.Run {
4342 run1Id := "ar"
4443 bundle := ""
@@ -194,11 +193,11 @@ func TestFormattableTestsArePrintedInOrder(t *testing.T) {
194193 //StartTimeUTC string
195194 //EndTimeUTC string
196195 QueuedTimeUTC : "2023-05-04T10:45:29.545323Z" ,
197- Requestor : "Requestor1" ,
198- Bundle : "bundle1" ,
199- ApiServerUrl : "127.0.0.1 " ,
200- Methods : nil ,
201- Lost : false ,
196+ Requestor : "Requestor1" ,
197+ Bundle : "bundle1" ,
198+ ApiServerUrl : "https://my.host1/api " ,
199+ Methods : nil ,
200+ Lost : false ,
202201 }
203202 formattableTest2 := runsformatter.FormattableTest {
204203 RunId : "id2" ,
@@ -209,11 +208,11 @@ func TestFormattableTestsArePrintedInOrder(t *testing.T) {
209208 //StartTimeUTC string
210209 //EndTimeUTC string
211210 QueuedTimeUTC : "2023-05-04T10:45:29.545323Z" ,
212- Requestor : "Requestor2" ,
213- Bundle : "bundle2" ,
214- ApiServerUrl : "127.0.0.1 " ,
215- Methods : nil ,
216- Lost : false ,
211+ Requestor : "Requestor2" ,
212+ Bundle : "bundle2" ,
213+ ApiServerUrl : "https://my.host2/api " ,
214+ Methods : nil ,
215+ Lost : false ,
217216 }
218217 formattableTest3 := runsformatter.FormattableTest {
219218 RunId : "id3" ,
@@ -224,11 +223,11 @@ func TestFormattableTestsArePrintedInOrder(t *testing.T) {
224223 //StartTimeUTC string
225224 //EndTimeUTC string
226225 QueuedTimeUTC : "2023-05-04T10:45:29.545323Z" ,
227- Requestor : "Requestor3" ,
228- Bundle : "bundle3" ,
229- ApiServerUrl : "137.0.0.1 " ,
230- Methods : nil ,
231- Lost : false ,
226+ Requestor : "Requestor3" ,
227+ Bundle : "bundle3" ,
228+ ApiServerUrl : "https://my.host3/api " ,
229+ Methods : nil ,
230+ Lost : false ,
232231 }
233232 formattableTest4 := runsformatter.FormattableTest {
234233 RunId : "id4" ,
@@ -239,11 +238,11 @@ func TestFormattableTestsArePrintedInOrder(t *testing.T) {
239238 //StartTimeUTC string
240239 //EndTimeUTC string
241240 QueuedTimeUTC : "2023-05-04T10:45:29.545323Z" ,
242- Requestor : "Requestor4" ,
243- Bundle : "bundle4" ,
244- ApiServerUrl : "147.0.0.1 " ,
245- Methods : nil ,
246- Lost : false ,
241+ Requestor : "Requestor4" ,
242+ Bundle : "bundle4" ,
243+ ApiServerUrl : "https://my.host4/api " ,
244+ Methods : nil ,
245+ Lost : false ,
247246 }
248247 formattableTest5 := runsformatter.FormattableTest {
249248 RunId : "id5" ,
@@ -254,11 +253,11 @@ func TestFormattableTestsArePrintedInOrder(t *testing.T) {
254253 //StartTimeUTC string
255254 //EndTimeUTC string
256255 QueuedTimeUTC : "2023-05-04T10:45:29.545323Z" ,
257- Requestor : "Requestor5" ,
258- Bundle : "bundle5" ,
259- ApiServerUrl : "157.0.0.1 " ,
260- Methods : nil ,
261- Lost : false ,
256+ Requestor : "Requestor5" ,
257+ Bundle : "bundle5" ,
258+ ApiServerUrl : "https://my.host5/api " ,
259+ Methods : nil ,
260+ Lost : false ,
262261 }
263262 formattableTest6 := runsformatter.FormattableTest {
264263 RunId : "id6" ,
@@ -269,11 +268,11 @@ func TestFormattableTestsArePrintedInOrder(t *testing.T) {
269268 //StartTimeUTC string
270269 //EndTimeUTC string
271270 QueuedTimeUTC : "2023-05-04T10:45:29.545323Z" ,
272- Requestor : "Requestor6" ,
273- Bundle : "bundle6" ,
274- ApiServerUrl : "167.0.0.1 " ,
275- Methods : nil ,
276- Lost : false ,
271+ Requestor : "Requestor6" ,
272+ Bundle : "bundle6" ,
273+ ApiServerUrl : "https://my.host6/api " ,
274+ Methods : nil ,
275+ Lost : false ,
277276 }
278277 formattableTest7 := runsformatter.FormattableTest {
279278 RunId : "id7" ,
@@ -284,11 +283,11 @@ func TestFormattableTestsArePrintedInOrder(t *testing.T) {
284283 //StartTimeUTC string
285284 //EndTimeUTC string
286285 QueuedTimeUTC : "2023-05-04T10:45:29.545323Z" ,
287- Requestor : "Requestor7" ,
288- Bundle : "bundle7" ,
289- ApiServerUrl : "177.0.0.1 " ,
290- Methods : nil ,
291- Lost : false ,
286+ Requestor : "Requestor7" ,
287+ Bundle : "bundle7" ,
288+ ApiServerUrl : "https://my.host7/api " ,
289+ Methods : nil ,
290+ Lost : false ,
292291 }
293292 formattableTest = append (formattableTest , formattableTest1 , formattableTest2 , formattableTest3 , formattableTest4 , formattableTest5 , formattableTest6 , formattableTest7 )
294293 //When
@@ -420,20 +419,20 @@ func TestRunsOfTestRunStructArePrintedInSortedOrder(t *testing.T) {
420419
421420func TestGherkinRunReturnsCorrectFormattableTestly (t * testing.T ) {
422421 testRun := TestRun {
423- Name : "" ,
424- Bundle : "" ,
425- Class : "" ,
426- Stream : "" ,
427- Status : "myStatus" ,
428- Result : "Passed" ,
429- Overrides : make (map [string ]string , 1 ),
430- Tests : []TestMethod {{Method : "Scenario1" , Result : "passed" }, {Method : "Scenario2" , Result : "passed" }},
431- GherkinUrl : "file:///my/directory/path/GherkinFeature.feature" ,
422+ Name : "" ,
423+ Bundle : "" ,
424+ Class : "" ,
425+ Stream : "" ,
426+ Status : "myStatus" ,
427+ Result : "Passed" ,
428+ Overrides : make (map [string ]string , 1 ),
429+ Tests : []TestMethod {{Method : "Scenario1" , Result : "passed" }, {Method : "Scenario2" , Result : "passed" }},
430+ GherkinUrl : "file:///my/directory/path/GherkinFeature.feature" ,
432431 GherkinFeature : "GherkinFeature" ,
433432 }
434433
435434 output := getTestRunData (testRun , false )
436435 assert .Equal (t , "GherkinFeature" , output .TestName )
437436 assert .Equal (t , "Passed" , output .Result )
438437 assert .Equal (t , "myStatus" , output .Status )
439- }
438+ }
0 commit comments