Skip to content

Commit

Permalink
Merge pull request #65 from rabestro/chore/blog-url
Browse files Browse the repository at this point in the history
Update endpoint id from 'count' to 'counter'
  • Loading branch information
Jegors Čemisovs authored Mar 17, 2024
2 parents f711704 + 9b1fc49 commit 4dff202
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 54 deletions.
2 changes: 1 addition & 1 deletion bruno/actuator/Reset Translation Counter.bru
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

delete {
url: {{host}}/actuator/count
url: {{host}}/actuator/counter
body: none
auth: none
}
Expand Down
2 changes: 1 addition & 1 deletion bruno/actuator/Show Translation Counter.bru
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

get {
url: {{host}}/actuator/count
url: {{host}}/actuator/counter
body: none
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

get {
url: {{host}}/actuator/count
url: {{host}}/actuator/counter
body: none
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

delete {
url: {{host}}/actuator/count
url: {{host}}/actuator/counter
body: none
auth: none
}
Expand Down
2 changes: 1 addition & 1 deletion bruno/scenario/translation-counter/Second Check.bru
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

get {
url: {{host}}/actuator/count
url: {{host}}/actuator/counter
body: none
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

post {
url: {{host}}/actuator/count
url: {{host}}/actuator/counter
body: json
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

get {
url: {{host}}/actuator/count
url: {{host}}/actuator/counter
body: none
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

get {
url: {{host}}/actuator/count
url: {{host}}/actuator/counter
body: none
auth: none
}
Expand Down
2 changes: 1 addition & 1 deletion http-client/poc/increase-counter.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@sut = actuator/count
@sut = actuator/counter

### Read Translation Counter
GET {{host}}/{{sut}}
Expand Down
2 changes: 1 addition & 1 deletion http-client/scenario/translation-counter.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@sut = actuator/count
@sut = actuator/counter

### Reset Translation Counter
DELETE {{host}}/{{sut}}
Expand Down
2 changes: 1 addition & 1 deletion http-yac/actuator/reset-translation-counter.http
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DELETE {{host}}/actuator/translation-count
DELETE {{host}}/actuator/counter

?? status == 204
2 changes: 1 addition & 1 deletion http-yac/actuator/show-translation-counter.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{host}}/actuator/translation-count
{{host}}/actuator/counter

?? status == 200
?? body count isNumber
Expand Down
2 changes: 1 addition & 1 deletion http-yac/poc/increase-counter.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@sut = actuator/translation-count
@sut = actuator/counter

### Read Translation Counter
# @name translationCounter
Expand Down
2 changes: 1 addition & 1 deletion http-yac/scenario/translation-counter.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@sut = actuator/count
@sut = actuator/counter

### Reset Translation Counter
DELETE {{host}}/{{sut}}
Expand Down
12 changes: 6 additions & 6 deletions hurl/translation-counter.hurl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Reset Translation Counter
DELETE {{host}}/actuator/count
DELETE {{host}}/actuator/counter
HTTP 204

# Zero Translation Counter
GET {{host}}/actuator/count
GET {{host}}/actuator/counter
HTTP 200
[Asserts]
header "Content-Type" contains "json"
Expand All @@ -23,7 +23,7 @@ Content-Type: application/json
jsonpath "$.sentence" == "ellohay, orldway!"

# Check Translation Counter
GET {{host}}/actuator/count
GET {{host}}/actuator/counter
HTTP 200
[Asserts]
jsonpath "$.count" == 1
Expand All @@ -42,13 +42,13 @@ Content-Type: application/json
jsonpath "$.sentence" == "ethay ickquay ownbray oxfay umpsjay overay ethay azylay ogday."

# Second Counter Check
GET {{host}}/actuator/count
GET {{host}}/actuator/counter
HTTP 200
[Asserts]
jsonpath "$.count" == 2

# Set Translation Counter
POST {{host}}/actuator/count
POST {{host}}/actuator/counter
Content-Type: application/json

{"count": 9}
Expand All @@ -58,7 +58,7 @@ HTTP 200
jsonpath "$.count" == 9

# Check Changed Counter
GET {{host}}/actuator/count
GET {{host}}/actuator/counter
HTTP 200
[Asserts]
jsonpath "$.count" == 9
34 changes: 1 addition & 33 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

<properties>
<java.version>17</java.version>
<groovy.version>4.0.18</groovy.version>
<groovy.version>4.0.20</groovy.version>

<swagger-api.version>2.2.20</swagger-api.version>
<swagger-ui.version>5.10.3</swagger-ui.version>
Expand Down Expand Up @@ -537,38 +537,6 @@
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>

<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<executions>
<!-- Generate JMeter configuration -->
<execution>
<id>configuration</id>
<goals>
<goal>configure</goal>
</goals>
</execution>
<!-- Run JMeter tests -->
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
<!-- Fail build on errors in test -->
<execution>
<id>jmeter-check-results</id>
<goals>
<goal>results</goal>
</goals>
</execution>
</executions>
<configuration>
<generateReports>true</generateReports>
<jmeterVersion>5.6.3</jmeterVersion>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* It provides methods for reading, setting, and resetting the translation count.
*/
@Component
@Endpoint(id = "count")
@Endpoint(id = "counter")
public class TranslationCountEndpoint {

private final AtomicInteger counterService;
Expand Down

0 comments on commit 4dff202

Please sign in to comment.