mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
more clear err log
This commit is contained in:
parent
0e097af8d8
commit
5c953681ad
@ -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) {
|
|||||||
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) {
|
|||||||
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) {
|
|||||||
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()")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user