From 1cda33892e1ac925b777100ac50f719c682ec5f5 Mon Sep 17 00:00:00 2001 From: Alexandru Giurgiu Date: Thu, 9 Mar 2017 13:46:00 +0200 Subject: [PATCH] renamed the cart-db to carts-db --- .../weave/socks/cart/controllers/HealthCheckController.java | 2 +- src/main/java/works/weave/socks/cart/entities/Item.java | 2 +- src/main/resources/application.properties | 2 +- test/container.py | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/works/weave/socks/cart/controllers/HealthCheckController.java b/src/main/java/works/weave/socks/cart/controllers/HealthCheckController.java index 1a42c8848..cc91c63fa 100644 --- a/src/main/java/works/weave/socks/cart/controllers/HealthCheckController.java +++ b/src/main/java/works/weave/socks/cart/controllers/HealthCheckController.java @@ -29,7 +29,7 @@ Map> getHealth() { 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 }"); diff --git a/src/main/java/works/weave/socks/cart/entities/Item.java b/src/main/java/works/weave/socks/cart/entities/Item.java index 5171eaee4..7f45da8e1 100644 --- a/src/main/java/works/weave/socks/cart/entities/Item.java +++ b/src/main/java/works/weave/socks/cart/entities/Item.java @@ -103,4 +103,4 @@ public float getUnitPrice() { public void setUnitPrice(float unitPrice) { this.unitPrice = unitPrice; } -} \ No newline at end of file +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 09658b346..35146f238 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,5 +1,5 @@ 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 diff --git a/test/container.py b/test/container.py index c541f66b3..bde4494a3 100644 --- a/test/container.py +++ b/test/container.py @@ -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 @@ def test_api_validated(self): 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)