Unverified Commit ad97a03e authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #66331 from foxyriver/fix-log-error

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. more clear err log **What this PR does / why we need it**: more clear err log **Release note**: ```release-note NONE ```
parents e4465b6e 5c953681
...@@ -39,7 +39,7 @@ func TestExistingDataDirWithVersionFile(t *testing.T) { ...@@ -39,7 +39,7 @@ func TestExistingDataDirWithVersionFile(t *testing.T) {
t.Fatalf("Failed to check if data dir is empty: %v", err) t.Fatalf("Failed to check if data dir is empty: %v", err)
} }
if isEmpty { if isEmpty {
t.Errorf("Data directory is non-empty") t.Errorf("Expected non-empty data directory to exist")
} }
exists, err := d.versionFile.Exists() exists, err := d.versionFile.Exists()
if err != nil { if err != nil {
...@@ -97,7 +97,7 @@ func TestNonexistingDataDir(t *testing.T) { ...@@ -97,7 +97,7 @@ func TestNonexistingDataDir(t *testing.T) {
t.Fatalf("Failed to check if data dir is empty: %v", err) t.Fatalf("Failed to check if data dir is empty: %v", err)
} }
if !isEmpty { if !isEmpty {
t.Errorf("Data directory is empty") t.Errorf("Expected empty data directory to exist")
} }
err = d.Initialize(targetVersion) err = d.Initialize(targetVersion)
if err != nil { if err != nil {
...@@ -115,7 +115,7 @@ func TestNonexistingDataDir(t *testing.T) { ...@@ -115,7 +115,7 @@ func TestNonexistingDataDir(t *testing.T) {
t.Fatalf("Failed to check if data dir is empty: %v", err) t.Fatalf("Failed to check if data dir is empty: %v", err)
} }
if isEmpty { if isEmpty {
t.Errorf("Data directory is non-empty") t.Errorf("Expected non-empty data directory to exist after Initialize()")
} }
vp, err := d.versionFile.Read() vp, err := d.versionFile.Read()
if err != nil { if err != nil {
...@@ -145,7 +145,7 @@ func TestBackup(t *testing.T) { ...@@ -145,7 +145,7 @@ func TestBackup(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
if isEmpty { if isEmpty {
t.Errorf("Expected non-empty backup directory afer Backup()") t.Errorf("Expected non-empty backup directory to exist after Backup()")
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment