Skip to content
Snippets Groups Projects
Commit 34d569b5 authored by Christian Pointner's avatar Christian Pointner
Browse files

fix auth testing

parent ea54d348
No related branches found
No related tags found
No related merge requests found
......@@ -94,7 +94,7 @@ func newSession() http.Handler {
switch strings.ToLower(request.Backend) {
case "oidc":
if auth.oidc == nil {
sendHTTPErrorResponse(w, http.StatusBadRequest, "OIDC authentication is not configured")
sendHTTPErrorResponse(w, http.StatusBadRequest, "OIDC authentication is not enabled")
return
}
s, err := auth.oidc.NewOIDCSession()
......
//
// tank
//
// Import and Playlist Daemon for autoradio project
//
//
// Copyright (C) 2017-2019 Christian Pointner <equinox@helsinki.at>
//
// This file is part of tank.
//
// tank is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// tank is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with tank. If not, see <http://www.gnu.org/licenses/>.
//
package auth
import (
"io/ioutil"
"log"
"os"
"testing"
)
func TestMain(m *testing.M) {
auth.infoLog = log.New(ioutil.Discard, "", 0)
auth.errLog = log.New(ioutil.Discard, "", 0)
auth.dbgLog = log.New(ioutil.Discard, "", 0)
os.Exit(m.Run())
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment