Merge pull request #10457 from govargo/fix-test-check-docker-version

[Unit Test] Fix TestCheckDockerVersion Assertion
pull/10463/head
Medya Ghazizadeh 2021-02-12 12:13:45 -08:00 committed by GitHub
commit bd788dbc83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -86,8 +86,10 @@ func TestCheckDockerVersion(t *testing.T) {
for _, c := range tc {
t.Run("checkDockerVersion test", func(t *testing.T) {
s := checkDockerVersion(c.version)
if c.expect != s.Reason {
t.Errorf("Error %v expected. but got %q. (version string : %s)", c.expect, s.Reason, c.version)
if s.Error != nil {
if c.expect != s.Reason {
t.Errorf("Error %v expected. but got %q. (version string : %s)", c.expect, s.Reason, c.version)
}
}
})
}