Commit 1cda3389 authored by Alexandru Giurgiu's avatar Alexandru Giurgiu

renamed the cart-db to carts-db

parent fd7fb7f9
......@@ -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 }");
......
......@@ -103,4 +103,4 @@ public class Item {
public void setUnitPrice(float unitPrice) {
this.unitPrice = unitPrice;
}
}
\ No newline at end of file
}
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