Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
renamed the cart-db to carts-db
Browse files Browse the repository at this point in the history
  • Loading branch information
nustiueudinastea committed Mar 9, 2017
1 parent fd7fb7f commit 1cda338
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Map<String, List<HealthCheck>> 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 }");
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/works/weave/socks/cart/entities/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ public float getUnitPrice() {
public void setUnitPrice(float unitPrice) {
this.unitPrice = unitPrice;
}
}
}
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit 1cda338

Please sign in to comment.