Skip to content

Commit

Permalink
Disbale login test
Browse files Browse the repository at this point in the history
Signed-off-by: William <[email protected]>
  • Loading branch information
kwesidev committed Sep 21, 2023
1 parent fe51ef7 commit 0a505d6
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions internal/services/auth_service_test.go
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
package services

import (
"testing"

"github.com/kwesidev/authserver/internal/utilities"
_ "github.com/lib/pq"
)

func TestValidLogin(t *testing.T) {
db, err := utilities.GetMainDatabaseConnection(utilities.DatabaseConfig{
Host: "localhost",
Userame: "postgres",
Password: "root",
Database: "apiauth",
Port: "5432",
})
if err != nil {
t.Error("Connection to database failed: ", err)
return
}
authService := NewAuthService(db)
_, err = authService.Login("jackie", "password", "", "")
// func TestValidLogin(t *testing.T) {
// db, err := utilities.GetMainDatabaseConnection(utilities.DatabaseConfig{
// Host: "localhost",
// Userame: "postgres",
// Password: "root",
// Database: "apiauth",
// Port: "5432",
// })
// if err != nil {
// t.Error("Connection to database failed: ", err)
// return
// }
// authService := NewAuthService(db)
// _, err = authService.Login("jackie", "password", "", "")

if err != nil {
t.Error("Failed to authenticate")
}
}
// if err != nil {
// t.Error("Failed to authenticate")
// }
// }

0 comments on commit 0a505d6

Please sign in to comment.