File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ func init() {
1919 switch runtime .GOOS {
2020 case "windows" :
2121 HostsFilePath = "$env:windir/System32/drivers/etc/hosts"
22- NoFileErrorMessage = "Cannot find path \\ r\\ n'.+%s' because it does not exist."
22+ NoFileErrorMessage = "Cannot find path ( \\ r\\ n)* '.+%s' because ( \\ r \\ n)* it ( \\ r \\ n)* does ( \\ r \\ n)* not ( \\ r \\ n)* exist."
2323 case "linux" :
2424 HostsFilePath = "/etc/hosts"
2525 NoFileErrorMessage = "%s: No such file or directory"
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ func TestTaskLogs__PrintFile(t *testing.T) {
3232 name : "print-non-existing-file" ,
3333 path : "non-existing-file.txt" ,
3434 responseStatus : http .StatusInternalServerError ,
35- responseBody : "" ,
35+ responseBody : "Error when executing the task: exit status 1 " ,
3636 stdoutRegexp : fmt .Sprintf (helper .NoFileErrorMessage , "non-existing-file.txt" ),
3737 },
3838 }
@@ -52,7 +52,7 @@ func TestTaskLogs__PrintFile(t *testing.T) {
5252 })
5353
5454 assert .Equal (t , tc .responseStatus , responseRecorder .Code )
55- assert .Equal (t , tc .responseBody , tc . responseBody )
55+ assert .Equal (t , tc .responseBody , responseRecorder . Body . String () )
5656 assert .Regexp (t , tc .stdoutRegexp , stdout )
5757 })
5858 }
You can’t perform that action at this time.
0 commit comments