Commit d99dff88 authored by Alex Giurgiu's avatar Alex Giurgiu Committed by GitHub

Merge pull request #25 from microservices-demo/rename-cart-db-to-carts-db

renamed the cart-db to carts-db
parents fd7fb7f9 1cda3389
......@@ -29,7 +29,7 @@ public class HealthCheckController {
Date dateNow = Calendar.getInstance().getTime();
HealthCheck app = new HealthCheck("cart", "OK", dateNow);
HealthCheck database = new HealthCheck("cart-db", "OK", dateNow);
HealthCheck database = new HealthCheck("carts-db", "OK", dateNow);
try {
mongoTemplate.executeCommand("{ buildInfo: 1 }");
......
server.port=${port:8081}
spring.data.mongodb.uri=mongodb://${db:cart-db}:27017/data
spring.data.mongodb.uri=mongodb://${db:carts-db}:27017/data
endpoints.health.enabled=false
spring.zipkin.baseUrl=http://${zipkin:zipkin}:9411/
spring.sleuth.sampler.percentage=1.0
......
......@@ -12,13 +12,13 @@ class CartContainerTest(unittest.TestCase):
TAG = "latest"
COMMIT = ""
container_name = Docker().random_container_name('carts')
mongo_container_name = Docker().random_container_name('cart-db')
mongo_container_name = Docker().random_container_name('carts-db')
def __init__(self, methodName='runTest'):
super(CartContainerTest, self).__init__(methodName)
self.ip = ""
def setUp(self):
Docker().start_container(container_name=self.mongo_container_name, image="mongo", host="cart-db")
Docker().start_container(container_name=self.mongo_container_name, image="mongo", host="carts-db")
command = ['docker', 'run',
'-d',
'--name', CartContainerTest.container_name,
......@@ -44,7 +44,7 @@ class CartContainerTest(unittest.TestCase):
out = Dredd().test_against_endpoint(
"carts", "http://carts/",
links=[self.mongo_container_name, self.container_name],
env=[("MONGO_ENDPOINT", "mongodb://cart-db:27017/data")],
env=[("MONGO_ENDPOINT", "mongodb://carts-db:27017/data")],
dump_streams=True)
self.assertGreater(out.find("0 failing"), -1)
self.assertGreater(out.find("0 errors"), -1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment