Skip to content

Commit

Permalink
update: test file
Browse files Browse the repository at this point in the history
  • Loading branch information
mateo08c committed Jul 16, 2024
1 parent 1c0ba80 commit b5578ef
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ var context *glauth.Context
// start on init
func init() {
err := godotenv.Load()
if err != nil {
log.Fatal("Error loading .env file")
if err == nil {
log.Println("Loaded from .env file")
}

log.Println("Loaded .env file")

context = &glauth.Context{
Username: os.Getenv("DB_USERNAME"),
Password: os.Getenv("DB_PASSWORD"),
Expand Down Expand Up @@ -94,6 +92,14 @@ func TestGroup(t *testing.T) {
if group == nil {
t.Log("Group not found")
}

//try to get all groups
groups, err := client.GetGroups()
if err != nil {
t.Fatal(err)
}

t.Log(groups)
}

func TestUser(t *testing.T) {
Expand Down

0 comments on commit b5578ef

Please sign in to comment.