update secret create url for consistency

Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
allencloud
2016-11-17 10:51:16 +08:00
parent c6d69ea9e9
commit 86d7682843
4 changed files with 5 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ func TestSecretCreateError(t *testing.T) {
}
func TestSecretCreate(t *testing.T) {
expectedURL := "/secrets"
expectedURL := "/secrets/create"
client := &Client{
client: newMockClient(func(req *http.Request) (*http.Response, error) {
if !strings.HasPrefix(req.URL.Path, expectedURL) {
@@ -41,7 +41,7 @@ func TestSecretCreate(t *testing.T) {
return nil, err
}
return &http.Response{
StatusCode: http.StatusOK,
StatusCode: http.StatusCreated,
Body: ioutil.NopCloser(bytes.NewReader(b)),
}, nil
}),