1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
--- gitlab-runner-v12.1.0/shells/bash_test.go 2019-07-19 12:13:32.000000000 +0000
+++ gitlab-runner-v12.1.0/shells/bash_test.go 2020-04-27 00:07:06.763360621 +0000
@@ -10,12 +10,12 @@ func TestBash_CommandShellEscapes(t *tes
writer := &BashWriter{}
writer.Command("foo", "x&(y)")
- assert.Equal(t, `$'foo' "x&(y)"`+"\n", writer.String())
+ assert.Equal(t, `'foo' "x&(y)"`+"\n", writer.String())
}
func TestBash_IfCmdShellEscapes(t *testing.T) {
writer := &BashWriter{}
writer.IfCmd("foo", "x&(y)")
- assert.Equal(t, `if $'foo' "x&(y)" >/dev/null 2>/dev/null; then`+"\n", writer.String())
+ assert.Equal(t, `if 'foo' "x&(y)" >/dev/null 2>/dev/null; then`+"\n", writer.String())
}
--- gitlab-runner-v12.1.0/executors/shell/shell_integration_test.go 2019-07-19 12:13:32.000000000 +0000
+++ gitlab-runner-v12.1.0/executors/shell/shell_integration_test.go 2020-04-27 00:01:12.813355024 +0000
@@ -166,7 +166,7 @@ func TestBuildAbort(t *testing.T) {
defer abortTimer.Stop()
err = buildtest.RunBuild(t, build)
- assert.EqualError(t, err, "aborted: interrupt")
+ assert.EqualError(t, err, "aborted: Interrupt")
})
}
--- gitlab-runner-v12.1.0/executors/custom/integration_test.go 2019-07-19 12:13:32.000000000 +0000
+++ gitlab-runner-v12.1.0/executors/custom/integration_test.go 2020-04-27 00:00:42.493354545 +0000
@@ -237,7 +237,7 @@ func TestBuildAbort(t *testing.T) {
defer abortTimer.Stop()
err = buildtest.RunBuild(t, build)
- assert.EqualError(t, err, "aborted: interrupt")
+ assert.EqualError(t, err, "aborted: Interrupt")
})
}
--- gitlab-runner-v12.1.0/helpers/shell_escape_test.go 2019-07-19 12:13:32.000000000 +0000
+++ gitlab-runner-v12.1.0/helpers/shell_escape_test.go 2020-04-27 00:02:36.213356343 +0000
@@ -24,8 +24,8 @@ func TestShellEscape(t *testing.T) {
in string
out string
}{
- {"standard string", "$'standard string'"},
- {"+\t\n\r&", "$'+\\t\\n\\r&'"},
+ {"standard string", "'standard string'"},
+ {"+\t\n\r&", "'+\t\n\r&'"},
{"", "''"},
}
--- gitlab-runner-v12.1.0/common/build_test.go 2019-07-19 12:13:32.000000000 +0000
+++ gitlab-runner-v12.1.0/common/build_test.go 2020-04-27 00:23:35.173376249 +0000
@@ -1190,7 +1190,7 @@ func TestWaitForTerminal(t *testing.T) {
},
jobTimeout: 3600,
waitForTerminalTimeout: time.Hour,
- expectedErr: "terminal disconnected by system signal: interrupt",
+ expectedErr: "terminal disconnected by system signal: Interrupt",
},
{
name: "Terminal Disconnect",
|