Skip to content

Commit 4ad228d

Browse files
committed
fix(tests): Escape branches with special chars
Signed-off-by: spbsoluble <[email protected]>
1 parent 332ee30 commit 4ad228d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/storeTypes_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,10 @@ func createAllStoreTypes(t *testing.T, storeTypes map[string]interface{}) {
215215
if isGhAction == "true" {
216216
ghBranch := os.Getenv("GITHUB_REF")
217217
ghBranch = strings.Replace(ghBranch, "refs/heads/", "", 1)
218-
testArgs = append(testArgs, "--git-ref", ghBranch)
218+
// url escape the branch name
219+
ghBranch = url.QueryEscape(ghBranch)
220+
testArgs = append(testArgs, "--git-ref", fmt.Sprintf("'%s'", ghBranch))
219221
t.Log("GITHUB_REF: ", ghBranch)
220-
221222
}
222223
t.Log("testArgs: ", testArgs)
223224

0 commit comments

Comments
 (0)