mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-02 05:57:46 +09:00
linting again
This commit is contained in:
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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user