fix(http): update test to use platform.Error
parent
5297d1fee9
commit
a33f3ff672
|
@ -2,7 +2,6 @@ package http
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
@ -39,7 +38,10 @@ func Test_queryOrganization(t *testing.T) {
|
||||||
ID: platform.ID(1),
|
ID: platform.ID(1),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("unknown ID")
|
return nil, &platform.Error{
|
||||||
|
Code: platform.EInvalid,
|
||||||
|
Msg: "unknown org name",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -69,7 +71,10 @@ func Test_queryOrganization(t *testing.T) {
|
||||||
Name: "org1",
|
Name: "org1",
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("unknown org name")
|
return nil, &platform.Error{
|
||||||
|
Code: platform.EInvalid,
|
||||||
|
Msg: "unknown org name",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue