Add retries option to the clone step (#44)
* Add retries option to the clone step Used to support https://github.com/drone/drone-git/pull/43 Will require a go mod update to add the arg to the manifest: https://github.com/drone/runner-go/pull/22 * Update `runner-go` to v1.12.0 * Add test
This commit is contained in:
@@ -134,10 +134,17 @@ func TestCloneParams(t *testing.T) {
|
||||
if len(params) != 0 {
|
||||
t.Errorf("Expect zero depth ignored")
|
||||
}
|
||||
params = cloneParams(manifest.Clone{Depth: 50, SkipVerify: true})
|
||||
params = cloneParams(manifest.Clone{Retries: 0})
|
||||
if len(params) != 0 {
|
||||
t.Errorf("Expect zero retries ignored")
|
||||
}
|
||||
params = cloneParams(manifest.Clone{Depth: 50, SkipVerify: true, Retries: 4})
|
||||
if params["PLUGIN_DEPTH"] != "50" {
|
||||
t.Errorf("Expect clone depth 50")
|
||||
}
|
||||
if params["PLUGIN_RETRIES"] != "4" {
|
||||
t.Errorf("Expect clone retries 4")
|
||||
}
|
||||
if params["GIT_SSL_NO_VERIFY"] != "true" {
|
||||
t.Errorf("Expect GIT_SSL_NO_VERIFY is true")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user