fix e2e errorf formatting for 1.24 (#2809)

* fix e2e errorf formatting for 1.24

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* add %

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
This commit is contained in:
David Fridrich 2025-04-24 12:32:24 +02:00 committed by GitHub
parent 0e1be8d1ed
commit ace7703e29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ func TestMain(t *testing.M) {
func patchOrCreateDockerConfigFile() error {
userHome, err := os.UserHomeDir()
if err != nil {
return fmt.Errorf("unable retrieve user home dir to verify default container authentication. " + err.Error())
return fmt.Errorf("unable retrieve user home dir to verify default container authentication. err: %v", err.Error())
}
dockerConfigFile := filepath.Join(userHome, ".docker", "config.json")
_, err = os.Stat(dockerConfigFile)
@ -64,7 +64,7 @@ func createConfigAuth(dockerConfigFile string, content string) error {
}
_, err = f.WriteString(content)
if err != nil {
return fmt.Errorf("unable to create .docker/config.json file" + err.Error())
return fmt.Errorf("unable to create .docker/config.json file. err: %v", err.Error())
}
return nil
}