agent: add dockerManager.retrySleep method to mock time.Sleep in tests

This commit is contained in:
henrygd
2026-02-18 13:44:54 -05:00
parent ef92b254bf
commit 1def7d8d3a
2 changed files with 9 additions and 9 deletions

View File

@@ -387,8 +387,8 @@ func TestDockerManagerCreation(t *testing.T) {
func TestCheckDockerVersion(t *testing.T) {
tests := []struct {
name string
responses []struct {
name string
responses []struct {
statusCode int
body string
}
@@ -465,6 +465,7 @@ func TestCheckDockerVersion(t *testing.T) {
},
},
},
retrySleep: func(time.Duration) {},
}
dm.checkDockerVersion()
@@ -485,6 +486,7 @@ func TestCheckDockerVersion(t *testing.T) {
},
},
},
retrySleep: func(time.Duration) {},
}
dm.checkDockerVersion()