Skip to content

Commit

Permalink
Auth Unit Test Improvements (#45)
Browse files Browse the repository at this point in the history
* Cleaning up new auth tests

* More updates to tests; Dissolved commonParams type

* More test updates

* More argument validation for auth

* Fixed a bug in enable/disable user; Added more tests; Cleaned up unit tests

* Removed debug file
  • Loading branch information
hiranya911 authored Dec 7, 2017
1 parent 3837eb0 commit 789f99a
Show file tree
Hide file tree
Showing 4 changed files with 642 additions and 674 deletions.
12 changes: 12 additions & 0 deletions auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import (

var client *Client
var testIDToken string
var testGetUserResponse []byte
var testListUsersResponse []byte

func TestMain(m *testing.M) {
var (
Expand Down Expand Up @@ -78,6 +80,16 @@ func TestMain(m *testing.M) {
}
client.ks = ks

testGetUserResponse, err = ioutil.ReadFile("../testdata/get_user.json")
if err != nil {
log.Fatalln(err)
}

testListUsersResponse, err = ioutil.ReadFile("../testdata/list_users.json")
if err != nil {
log.Fatalln(err)
}

testIDToken = getIDToken(nil)
os.Exit(m.Run())
}
Expand Down
Loading

0 comments on commit 789f99a

Please sign in to comment.