Skip to content

Commit 361b184

Browse files
committed
Added:
bin/ folder to gitignore Added environment variables for calculation-service tripId defined as local variable instead of global for test cases
1 parent d2d370a commit 361b184

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ dist/
2525
nbdist/
2626
.nb-gradle/
2727
\.DS_Store
28+
29+
### Eclipse ###
30+
bin/

docker-compose-local.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ services:
116116
calculationservice:
117117
image: aista/calculation-service
118118
environment:
119+
- RABBIT_HOST=rabbitmq
119120
- EUREKA_SERVER=discoveryservice
121+
- MONGO_HOST=mongo
122+
- MONGO_PORT=27017
120123
command: ["go", "run", "main.go"]
121124
ports:
122125
- '8080'

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,10 @@ services:
141141
image: aista/calculation-service
142142
mem_limit: 512M
143143
environment:
144-
- EUREKA_SERVER=discoveryservice
145144
- RABBIT_HOST=rabbitmq
145+
- EUREKA_SERVER=discoveryservice
146+
- MONGO_HOST=mongo
147+
- MONGO_PORT=27017
146148
command: ["go", "run", "main.go"]
147149
ports:
148150
- '8080'

src/test/java/aist/edge/edgeservice/EdgeServiceIntegrationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ public static void initialize() {
121121
private TestRestTemplate restTemplate = new TestRestTemplate();
122122

123123
private String token;
124-
private String tripId;
125124

126125
@Before
127126
public void setUp() throws JSONException {
@@ -181,11 +180,12 @@ public void tripQueryGETSpecificTripRequestSuccess() throws JSONException, Inter
181180
HttpEntity<String> request = new HttpEntity<>(body, headers);
182181
ResponseEntity<String> postResponse = restTemplate.postForEntity(tripCommandURL + "/api/v1/trip", request,
183182
String.class);
183+
184184
assertThat(postResponse.getStatusCodeValue()).isEqualTo(201);
185185

186186
JSONObject json = new JSONObject(postResponse.getBody());
187-
tripId = json.getString("id");
188-
187+
String tripId = json.getString("id");
188+
189189
Thread.sleep(1000);
190190

191191
// when:

src/test/resources/docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ services:
101101
image: aista/calculation-service
102102
mem_limit: 512M
103103
environment:
104-
- EUREKA_SERVER=discoveryservice
105104
- RABBIT_HOST=rabbitmq
105+
- EUREKA_SERVER=discoveryservice
106+
- MONGO_HOST=mongo
107+
- MONGO_PORT=27017
106108
command: ["go", "run", "main.go"]
107109
ports:
108110
- '8080'

0 commit comments

Comments
 (0)