mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-03 07:18:37 +00:00
GenerateScript should not return encoded script (#1397)
followup to #1395
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -41,13 +40,13 @@ unset CI_NETRC_USERNAME
|
||||
unset CI_NETRC_PASSWORD
|
||||
unset CI_SCRIPT
|
||||
|
||||
echo + "echo \${PATH}"
|
||||
echo + 'echo ${PATH}'
|
||||
echo ${PATH}
|
||||
|
||||
echo + "go build"
|
||||
echo + 'go build'
|
||||
go build
|
||||
|
||||
echo + "go test"
|
||||
echo + 'go test'
|
||||
go test
|
||||
|
||||
`,
|
||||
@@ -55,8 +54,6 @@ go test
|
||||
}
|
||||
for _, test := range testdata {
|
||||
script := generateScriptPosix(test.from)
|
||||
decoded, _ := base64.StdEncoding.DecodeString(script)
|
||||
got := string(decoded)
|
||||
assert.EqualValues(t, got, test.want, "Want encoded script for %s", test.from)
|
||||
assert.EqualValues(t, test.want, script, "Want encoded script for %s", test.from)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user