Remove unused request scope fields
This commit is contained in:
		
							parent
							
								
									b794248176
								
							
						
					
					
						commit
						a310166981
					
				|  | @ -28,17 +28,6 @@ type RequestScope struct { | ||||||
| 	// Session details the authenticated users information (if it exists).
 | 	// Session details the authenticated users information (if it exists).
 | ||||||
| 	Session *sessions.SessionState | 	Session *sessions.SessionState | ||||||
| 
 | 
 | ||||||
| 	// SaveSession indicates whether the session storage should attempt to save
 |  | ||||||
| 	// the session or not.
 |  | ||||||
| 	SaveSession bool |  | ||||||
| 
 |  | ||||||
| 	// ClearSession indicates whether the user should be logged out or not.
 |  | ||||||
| 	ClearSession bool |  | ||||||
| 
 |  | ||||||
| 	// SessionRevalidated indicates whether the session has been revalidated since
 |  | ||||||
| 	// it was loaded or not.
 |  | ||||||
| 	SessionRevalidated bool |  | ||||||
| 
 |  | ||||||
| 	// Upstream tracks which upstream was used for this request
 | 	// Upstream tracks which upstream was used for this request
 | ||||||
| 	Upstream string | 	Upstream string | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -34,15 +34,15 @@ var _ = Describe("Scope Suite", func() { | ||||||
| 
 | 
 | ||||||
| 			Context("if the scope is then modified", func() { | 			Context("if the scope is then modified", func() { | ||||||
| 				BeforeEach(func() { | 				BeforeEach(func() { | ||||||
| 					Expect(scope.SaveSession).To(BeFalse()) | 					Expect(scope.RequestID).To(BeEmpty()) | ||||||
| 					scope.SaveSession = true | 					scope.RequestID = "abc123" | ||||||
| 				}) | 				}) | ||||||
| 
 | 
 | ||||||
| 				It("returns the updated session", func() { | 				It("returns the updated session", func() { | ||||||
| 					s := middleware.GetRequestScope(request) | 					s := middleware.GetRequestScope(request) | ||||||
| 					Expect(s).ToNot(BeNil()) | 					Expect(s).ToNot(BeNil()) | ||||||
| 					Expect(s).To(Equal(scope)) | 					Expect(s).To(Equal(scope)) | ||||||
| 					Expect(s.SaveSession).To(BeTrue()) | 					Expect(s.RequestID).To(Equal("abc123")) | ||||||
| 				}) | 				}) | ||||||
| 			}) | 			}) | ||||||
| 		}) | 		}) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue