Skip to content

Commit

Permalink
gofmt -s -w files
Browse files Browse the repository at this point in the history
  • Loading branch information
sredxny committed Sep 3, 2020
1 parent 0c545bb commit 3a06036
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions gateway/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,9 @@ func TestKeyHandler_UpdateKey(t *testing.T) {
{Method: http.MethodPut, Path: path, Data: sessionData, AdminAuth: true, Code: 200},
}...)

<<<<<<< HEAD
sessionState, found := FallbackKeySesionManager.SessionDetail(key, false)
if !found || sessionState.AccessRights[testAPIID].APIID != testAPIID || len(sessionState.ApplyPolicies) != 2 {
=======
sessionState, found := GlobalSessionManager.SessionDetail("default", key, false)
accessRight, _ := sessionState.GetAccessRightByAPIID(testAPIID)
if !found || accessRight.APIID != testAPIID || len(sessionState.ApplyPolicies) != 2 {
>>>>>>> 52b5ce95... implemented rw mutex for session and avoid multiple write access to the session (#3274)
t.Fatal("Adding policy to the list failed")
}
})
Expand All @@ -395,14 +390,9 @@ func TestKeyHandler_UpdateKey(t *testing.T) {
{Method: http.MethodPut, Path: path, Data: sessionData, AdminAuth: true, Code: 200},
}...)

<<<<<<< HEAD
sessionState, found := FallbackKeySesionManager.SessionDetail(key, false)
if !found || sessionState.AccessRights[testAPIID].APIID != testAPIID || len(sessionState.ApplyPolicies) != 0 {
=======
sessionState, found := GlobalSessionManager.SessionDetail("default", key, false)
accessRight, _ := sessionState.GetAccessRightByAPIID(testAPIID)
if !found || accessRight.APIID != testAPIID || len(sessionState.ApplyPolicies) != 0 {
>>>>>>> 52b5ce95... implemented rw mutex for session and avoid multiple write access to the session (#3274)
t.Fatal("Removing policy from the list failed")
}
})
Expand Down
2 changes: 1 addition & 1 deletion user/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type Monitor struct {
//
// swagger:model
type SessionState struct {
Mutex *sync.RWMutex
Mutex *sync.RWMutex
LastCheck int64 `json:"last_check" msg:"last_check"`
Allowance float64 `json:"allowance" msg:"allowance"`
Rate float64 `json:"rate" msg:"rate"`
Expand Down

0 comments on commit 3a06036

Please sign in to comment.