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
a0d72b3c
Commit
a0d72b3c
authored
Jun 01, 2015
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed test with encoded slashes
parent
23cde300
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
SampleZuulProxyApplicationTests.java
...k/cloud/netflix/zuul/SampleZuulProxyApplicationTests.java
+2
-14
No files found.
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/SampleZuulProxyApplicationTests.java
View file @
a0d72b3c
...
@@ -16,7 +16,8 @@
...
@@ -16,7 +16,8 @@
package
org
.
springframework
.
cloud
.
netflix
.
zuul
;
package
org
.
springframework
.
cloud
.
netflix
.
zuul
;
import
java.io.UnsupportedEncodingException
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
org.junit.Test
;
import
org.junit.Test
;
...
@@ -52,9 +53,6 @@ import com.netflix.loadbalancer.BaseLoadBalancer;
...
@@ -52,9 +53,6 @@ import com.netflix.loadbalancer.BaseLoadBalancer;
import
com.netflix.loadbalancer.ILoadBalancer
;
import
com.netflix.loadbalancer.ILoadBalancer
;
import
com.netflix.loadbalancer.Server
;
import
com.netflix.loadbalancer.Server
;
import
com.netflix.zuul.ZuulFilter
;
import
com.netflix.zuul.ZuulFilter
;
import
org.springframework.web.util.UriUtils
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
SampleZuulProxyApplication
.
class
)
@SpringApplicationConfiguration
(
classes
=
SampleZuulProxyApplication
.
class
)
...
@@ -144,16 +142,6 @@ public class SampleZuulProxyApplicationTests {
...
@@ -144,16 +142,6 @@ public class SampleZuulProxyApplicationTests {
assertEquals
(
"Hello space"
,
result
.
getBody
());
assertEquals
(
"Hello space"
,
result
.
getBody
());
}
}
@Test
public
void
postWithEncodedValueWorks
()
throws
UnsupportedEncodingException
{
String
id
=
UriUtils
.
encodePathSegment
(
"id/with/slashes"
,
"UTF-8"
);
ResponseEntity
<
String
>
result
=
new
TestRestTemplate
().
postForEntity
(
"http://localhost:"
+
this
.
port
+
"/simple/local/{id}"
,
"body"
,
String
.
class
,
id
);
assertEquals
(
HttpStatus
.
OK
,
result
.
getStatusCode
());
assertEquals
(
"Posted id/with/slashes!"
,
UriUtils
.
decode
(
result
.
getBody
(),
"UTF-8"
));
}
}
}
// Don't use @SpringBootApplication because we don't want to component scan
// Don't use @SpringBootApplication because we don't want to component scan
...
...
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