Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
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
DEMO
spring-boot
Commits
c5820d87
Commit
c5820d87
authored
Mar 25, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure new VCAP_SERVICES format works
parent
dae38224
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
VcapApplicationListenerTests.java
...ework/boot/cloudfoundry/VcapApplicationListenerTests.java
+11
-0
No files found.
spring-boot/src/test/java/org/springframework/boot/cloudfoundry/VcapApplicationListenerTests.java
View file @
c5820d87
...
...
@@ -75,4 +75,15 @@ public class VcapApplicationListenerTests {
assertEquals
(
"mysql"
,
this
.
context
.
getEnvironment
().
getProperty
(
"vcap.services.mysql.name"
));
}
@Test
public
void
testServicePropertiesWithoutNA
()
{
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"VCAP_SERVICES:{\"rds-mysql\":[{\"name\":\"mysql\",\"label\":\"rds-mysql\",\"plan\":\"10mb\",\"credentials\":{\"name\":\"d04fb13d27d964c62b267bbba1cffb9da\",\"hostname\":\"mysql-service-public.clqg2e2w3ecf.us-east-1.rds.amazonaws.com\",\"host\":\"mysql-service-public.clqg2e2w3ecf.us-east-1.rds.amazonaws.com\",\"port\":3306,\"user\":\"urpRuqTf8Cpe6\",\"username\":\"urpRuqTf8Cpe6\",\"password\":\"pxLsGVpsC9A5S\"}}]}"
);
this
.
initializer
.
onApplicationEvent
(
this
.
event
);
assertEquals
(
"mysql"
,
this
.
context
.
getEnvironment
().
getProperty
(
"vcap.services.mysql.name"
));
}
}
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