Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-cloud-netflix
Commits
ab9b5ba3
Commit
ab9b5ba3
authored
Jul 10, 2017
by
Ryan Baxter
Committed by
GitHub
Jul 10, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2104 from gzurowski/use-filter-constants
Use filter constants where appropriate
parents
70d39aae
05eef0e8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
9 deletions
+18
-9
FormZuulProxyApplicationTests.java
...ork/cloud/netflix/zuul/FormZuulProxyApplicationTests.java
+2
-1
FormZuulServletProxyApplicationTests.java
...ud/netflix/zuul/FormZuulServletProxyApplicationTests.java
+2
-1
RetryableZuulProxyApplicationTests.java
...loud/netflix/zuul/RetryableZuulProxyApplicationTests.java
+2
-1
SimpleZuulServerApplicationTests.java
.../cloud/netflix/zuul/SimpleZuulServerApplicationTests.java
+2
-1
SendErrorFilterIntegrationTests.java
...ix/zuul/filters/post/SendErrorFilterIntegrationTests.java
+6
-3
PreDecorationFilterTests.java
...ud/netflix/zuul/filters/pre/PreDecorationFilterTests.java
+2
-1
ZuulProxyTestBase.java
...netflix/zuul/filters/route/support/ZuulProxyTestBase.java
+2
-1
No files found.
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/FormZuulProxyApplicationTests.java
View file @
ab9b5ba3
...
...
@@ -63,6 +63,7 @@ import org.springframework.web.multipart.MultipartFile;
import
static
java
.
nio
.
charset
.
Charset
.
defaultCharset
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
.
support
.
FilterConstants
.
PRE_TYPE
;
import
static
org
.
springframework
.
util
.
StreamUtils
.
copyToString
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -271,7 +272,7 @@ class FormZuulProxyApplication {
@Override
public
String
filterType
()
{
return
"pre"
;
return
PRE_TYPE
;
}
@Override
...
...
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/FormZuulServletProxyApplicationTests.java
View file @
ab9b5ba3
...
...
@@ -61,6 +61,7 @@ import org.springframework.web.bind.annotation.RestController;
import
org.springframework.web.multipart.MultipartFile
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
.
support
.
FilterConstants
.
PRE_TYPE
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -181,7 +182,7 @@ class FormZuulServletProxyApplication {
@Override
public
String
filterType
()
{
return
"pre"
;
return
PRE_TYPE
;
}
@Override
...
...
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/RetryableZuulProxyApplicationTests.java
View file @
ab9b5ba3
...
...
@@ -37,6 +37,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RestController
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
.
support
.
FilterConstants
.
PRE_TYPE
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBootTest
(
classes
=
RetryableZuulProxyApplication
.
class
,
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
value
=
{
...
...
@@ -100,7 +101,7 @@ class RetryableZuulProxyApplication {
return
new
ZuulFilter
()
{
@Override
public
String
filterType
()
{
return
"pre"
;
return
PRE_TYPE
;
}
@Override
...
...
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/SimpleZuulServerApplicationTests.java
View file @
ab9b5ba3
...
...
@@ -45,6 +45,7 @@ import org.springframework.web.bind.annotation.RestController;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
.
support
.
FilterConstants
.
PRE_TYPE
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBootTest
(
classes
=
SimpleZuulServerApplication
.
class
,
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
...
...
@@ -119,7 +120,7 @@ class SimpleZuulServerApplication {
return
new
ZuulFilter
()
{
@Override
public
String
filterType
()
{
return
"pre"
;
return
PRE_TYPE
;
}
@Override
...
...
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/post/SendErrorFilterIntegrationTests.java
View file @
ab9b5ba3
...
...
@@ -47,6 +47,9 @@ import org.springframework.web.bind.annotation.RestController;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
springframework
.
boot
.
test
.
context
.
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
;
import
static
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
.
support
.
FilterConstants
.
POST_TYPE
;
import
static
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
.
support
.
FilterConstants
.
PRE_TYPE
;
import
static
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
.
support
.
FilterConstants
.
ROUTE_TYPE
;
/**
* @author Spencer Gibb
...
...
@@ -111,7 +114,7 @@ public class SendErrorFilterIntegrationTests {
return
new
FailureFilter
()
{
@Override
public
String
filterType
()
{
return
"pre"
;
return
PRE_TYPE
;
}
};
}
...
...
@@ -121,7 +124,7 @@ public class SendErrorFilterIntegrationTests {
return
new
FailureFilter
()
{
@Override
public
String
filterType
()
{
return
"route"
;
return
ROUTE_TYPE
;
}
};
}
...
...
@@ -131,7 +134,7 @@ public class SendErrorFilterIntegrationTests {
return
new
FailureFilter
()
{
@Override
public
String
filterType
()
{
return
"post"
;
return
POST_TYPE
;
}
};
}
...
...
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/pre/PreDecorationFilterTests.java
View file @
ab9b5ba3
...
...
@@ -42,6 +42,7 @@ import static org.junit.Assert.assertFalse;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
mockito
.
MockitoAnnotations
.
initMocks
;
import
static
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
.
support
.
FilterConstants
.
FORWARD_TO_KEY
;
import
static
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
.
support
.
FilterConstants
.
PRE_TYPE
;
import
static
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
.
support
.
FilterConstants
.
REQUEST_URI_KEY
;
import
static
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
.
support
.
FilterConstants
.
SERVICE_ID_KEY
;
...
...
@@ -85,7 +86,7 @@ public class PreDecorationFilterTests {
public
void
basicProperties
()
throws
Exception
{
assertEquals
(
5
,
this
.
filter
.
filterOrder
());
assertEquals
(
true
,
this
.
filter
.
shouldFilter
());
assertEquals
(
"pre"
,
this
.
filter
.
filterType
());
assertEquals
(
PRE_TYPE
,
this
.
filter
.
filterType
());
}
@Test
...
...
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/route/support/ZuulProxyTestBase.java
View file @
ab9b5ba3
...
...
@@ -82,6 +82,7 @@ import static org.hamcrest.Matchers.is;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assume
.
assumeThat
;
import
static
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
.
support
.
FilterConstants
.
PRE_TYPE
;
/**
* @author Spencer Gibb
...
...
@@ -406,7 +407,7 @@ public abstract class ZuulProxyTestBase {
return
new
ZuulFilter
()
{
@Override
public
String
filterType
()
{
return
"pre"
;
return
PRE_TYPE
;
}
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment