mirror of
https://github.com/minio/minio.git
synced 2025-11-25 20:16:10 -05:00
Adding iodine error conversion
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"encoding/json"
|
||||
"os"
|
||||
)
|
||||
|
||||
func TestIodine(t *testing.T) {
|
||||
@@ -101,3 +102,15 @@ func TestState(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestToError(t *testing.T) {
|
||||
_, err := os.Stat("hello")
|
||||
ierr := New(err, nil)
|
||||
if ToError(ierr) != err {
|
||||
t.Error("Error is not the same")
|
||||
}
|
||||
ierr = New(ierr, nil)
|
||||
if ToError(ierr) != err {
|
||||
t.Error("Stacked Error is not the same")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user