Fixing linting errors: Making sure err is checked in azure_test and gofmt has been run

This commit is contained in:
leyshon 2019-08-29 15:37:25 +01:00
parent 0c541f6f5e
commit 311f14c7eb
2 changed files with 6 additions and 5 deletions

View File

@ -1,13 +1,13 @@
package providers package providers
import ( import (
"bytes"
"encoding/json"
"errors" "errors"
"fmt" "fmt"
"io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"encoding/json"
"io/ioutil"
"bytes"
"time" "time"
"github.com/bitly/go-simplejson" "github.com/bitly/go-simplejson"
@ -119,7 +119,7 @@ func (p *AzureProvider) Redeem(redirectURL, code string) (s *sessions.SessionSta
if err != nil { if err != nil {
return return
} }
s = &sessions.SessionState{ s = &sessions.SessionState{
AccessToken: jsonResponse.AccessToken, AccessToken: jsonResponse.AccessToken,
IDToken: jsonResponse.IDToken, IDToken: jsonResponse.IDToken,

View File

@ -207,8 +207,9 @@ func TestAzureProviderGetEmailAddressIncorrectOtherMails(t *testing.T) {
func TestAzureProviderRedeemReturnsIdToken(t *testing.T) { func TestAzureProviderRedeemReturnsIdToken(t *testing.T) {
b := testAzureBackend(`{ "id_token": "testtoken1234", "expires_on": "1136239445", "refresh_token": "refresh1234" }`) b := testAzureBackend(`{ "id_token": "testtoken1234", "expires_on": "1136239445", "refresh_token": "refresh1234" }`)
timestamp, err := time.Parse(time.RFC3339, "2006-01-02T22:04:05Z")
defer b.Close() defer b.Close()
timestamp, err := time.Parse(time.RFC3339, "2006-01-02T22:04:05Z")
assert.Equal(t, nil, err)
bURL, _ := url.Parse(b.URL) bURL, _ := url.Parse(b.URL)
p := testAzureProvider(bURL.Host) p := testAzureProvider(bURL.Host)