Skip to content

Commit 128341c

Browse files
committed
create basic Docker runner for RestListicator practice app
1 parent a1a5955 commit 128341c

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed

docker/readme.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,56 @@ And visit http://localhost:8000/docs to see the Swagger Docs UI.
125125

126126
And visit http://localhost:8000/redoc to see the Redoc Documentation UI.
127127

128+
## RestListicator
129+
130+
The RestListicator is the first Testing API I created, with some deliberate bugs.
131+
132+
It is part of the TestingApp project which as multiple testing practice apps.
133+
134+
- https://github.com/eviltester/TestingApp
135+
- specifically https://github.com/eviltester/TestingApp/tree/master/java/testingapps/restlisticator
136+
137+
There is a Swagger file in the docs folder.
138+
139+
It has a automated coverage using Java and RestAssured:
140+
141+
- https://github.com/eviltester/rest-listicator-automating-examples
142+
143+
Can be run using Docker as either 'normal' or 'buggy'.
144+
145+
Normal:
146+
147+
```
148+
docker build -t restlisticator -f ./docker/restlisticator/Dockerfile .
149+
150+
docker run -it -p 4567:4567 restlisticator
151+
```
152+
153+
Buggy:
154+
155+
```
156+
docker build -t restlisticatorbuggy -f ./docker/restlisticator/Dockerfile-with-bugs .
157+
158+
docker run -it -p 4567:4567 restlisticatorbuggy
159+
```
160+
161+
Then visit:
162+
163+
```
164+
http://localhost:4567/listicator/
165+
```
166+
167+
There are 3 default Users:
168+
169+
Basic authentication to use these users.
170+
171+
```
172+
username: superadmin, password: password
173+
username: admin, password: password
174+
username: user, password: password
175+
```
176+
177+
There are two entities:
178+
179+
- lists
180+
- users

docker/restlisticator/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM maven:3.9.9-amazoncorretto-11-alpine
2+
RUN wget https://github.com/eviltester/TestingApp/archive/refs/heads/master.zip
3+
RUN mkdir /home/TestingApp
4+
RUN unzip master.zip -d /home/TestingApp
5+
RUN cd /home/TestingApp/TestingApp-master/java/testingapps
6+
7+
WORKDIR /home/TestingApp/TestingApp-master/java/testingapps
8+
RUN mvn package
9+
10+
EXPOSE 4567
11+
12+
WORKDIR /home/TestingApp/TestingApp-master/java/testingapps/restlisticator/target
13+
CMD ["java", "-jar", "rest-list-system-1-2-2-jar-with-dependencies.jar"]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM maven:3.9.9-amazoncorretto-11-alpine
2+
RUN wget https://github.com/eviltester/TestingApp/archive/refs/heads/master.zip
3+
RUN mkdir /home/TestingApp
4+
RUN unzip master.zip -d /home/TestingApp
5+
RUN cd /home/TestingApp/TestingApp-master/java/testingapps
6+
7+
WORKDIR /home/TestingApp/TestingApp-master/java/testingapps
8+
RUN mvn package
9+
10+
EXPOSE 4567
11+
12+
WORKDIR /home/TestingApp/TestingApp-master/java/testingapps/restlisticator/target
13+
CMD ["java", "-jar", "rest-list-system-1-2-2-jar-with-dependencies.jar", "-bugfixes=false"]

0 commit comments

Comments
 (0)