mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-07 13:38:15 -08:00
Add Authentication Response Code checks (#15)
* add authentication tests to check status codes * update authentication test URLs to use the correct endpoint * Fix test failures
This commit is contained in:
parent
62bcbc6082
commit
0708cfbc02
1 changed files with 8 additions and 0 deletions
|
|
@ -150,6 +150,10 @@ func host() string {
|
|||
return fmt.Sprintf("http://%s", cfg.ListenAddr())
|
||||
}
|
||||
func TestHealthEndpointNoAuth(t *testing.T) {
|
||||
if os.Getenv("KOITO_SKIP_DOCKER") == "1" {
|
||||
t.Skip("skipping Docker-based integration test")
|
||||
}
|
||||
|
||||
client := &http.Client{
|
||||
Timeout: 5 * time.Second,
|
||||
}
|
||||
|
|
@ -164,6 +168,10 @@ func TestHealthEndpointNoAuth(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestHealthEndpointMethodNotAllowed(t *testing.T) {
|
||||
if os.Getenv("KOITO_SKIP_DOCKER") == "1" {
|
||||
t.Skip("skipping Docker-based integration test")
|
||||
}
|
||||
|
||||
client := &http.Client{
|
||||
Timeout: 5 * time.Second,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue