linting again
This commit is contained in:
parent
9de5c7f8b8
commit
da5250ea32
2 changed files with 30 additions and 36 deletions
27
app_test.go
27
app_test.go
|
@ -66,22 +66,19 @@ func (s *Suite) ResetDB(c *check.C) {
|
|||
|
||||
// Enusre an error is returned when an invalid auth mode
|
||||
// is supplied.
|
||||
func (s *Suite) TestInvalidClientAuthMode(c *check.C){
|
||||
app.cfg.TLSClientAuthMode = "invalid"
|
||||
_, err := app.GetClientAuthMode()
|
||||
c.Assert(err, check.NotNil)
|
||||
func (s *Suite) TestInvalidClientAuthMode(c *check.C) {
|
||||
app.cfg.TLSClientAuthMode = "invalid"
|
||||
_, err := app.GetClientAuthMode()
|
||||
c.Assert(err, check.NotNil)
|
||||
}
|
||||
|
||||
// Ensure that all client auth modes return a nil error
|
||||
func (s *Suite) TestAuthModes(c *check.C){
|
||||
|
||||
var modes = []string{"disabled", "relaxed", "enforced"}
|
||||
|
||||
for _, v := range modes {
|
||||
app.cfg.TLSClientAuthMode = v
|
||||
_, err := app.GetClientAuthMode()
|
||||
c.Assert(err, check.IsNil)
|
||||
}
|
||||
// Ensure that all client auth modes return a nil error.
|
||||
func (s *Suite) TestAuthModes(c *check.C) {
|
||||
modes := []string{"disabled", "relaxed", "enforced"}
|
||||
|
||||
for _, v := range modes {
|
||||
app.cfg.TLSClientAuthMode = v
|
||||
_, err := app.GetClientAuthMode()
|
||||
c.Assert(err, check.IsNil)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue