test(files, users): add e2e test and fix issues
This commit is contained in:
parent
b065684a47
commit
0265baf1b1
15 changed files with 5015 additions and 5327 deletions
30
src/client/settings.go
Normal file
30
src/client/settings.go
Normal file
|
@ -0,0 +1,30 @@
|
|||
package client
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/parnurzeal/gorequest"
|
||||
)
|
||||
|
||||
type SettingsClient struct {
|
||||
addr string
|
||||
r *gorequest.SuperAgent
|
||||
}
|
||||
|
||||
func NewSettingsClient(addr string) *SettingsClient {
|
||||
gr := gorequest.New()
|
||||
return &SettingsClient{
|
||||
addr: addr,
|
||||
r: gr,
|
||||
}
|
||||
}
|
||||
|
||||
func (cl *SettingsClient) url(urlpath string) string {
|
||||
return fmt.Sprintf("%s%s", cl.addr, urlpath)
|
||||
}
|
||||
|
||||
func (cl *SettingsClient) Health() (*http.Response, string, []error) {
|
||||
return cl.r.Options(cl.url("/v1/settings/health")).
|
||||
End()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue