Skip to content
This repository was archived by the owner on Sep 22, 2020. It is now read-only.

Commit 562dd1f

Browse files
author
clouless
committed
logs
1 parent e62db58 commit 562dd1f

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# poc-dockerized-database-integration-tests-atlassian-plugin
22

33
A simple Proof of Concept on how to run **Database Integration Tests with real dockerized PostgreSQL or MySQL Databases during Atlassian JIRA Plugin development**.
4-
This PoC is based on **[UnitTests for Active Objects](https://developer.atlassian.com/server/framework/atlassian-sdk/testing/)**.
4+
This PoC is based on **[UnitTests for Active Objects](https://developer.atlassian.com/server/framework/atlassian-sdk/testing/)**.
55

66
 
77

@@ -37,7 +37,8 @@ docker run --name postgres95 \
3737
-e POSTGRES_PASSWORD=jira \
3838
-e POSTGRES_USER=jira \
3939
-e POSTGRES_DB=jira \
40-
postgres:9.5
40+
postgres:9.5 \
41+
postgres -c 'log_statement=all'
4142
```
4243

4344
(2) Run tests against it
@@ -56,8 +57,13 @@ We can see the **tables and indexes**:
5657

5758
<p align="center"><img src="./doc/tables_and_indexes.png" width="80%"></p>
5859

60+
(3) See logged queries
5961

60-
(3) Shutdown dockerized PostgreSQL database.
62+
```
63+
docker logs postgres95
64+
```
65+
66+
(4) Shutdown dockerized PostgreSQL database.
6167

6268
```
6369
docker kill postgres95
@@ -108,25 +114,25 @@ docker kill mysql56
108114
* Businss Logic
109115
* [**`OwnerEntity`**](https://github.com/comsysto/poc-dockerized-database-integration-tests-atlassian-plugin/blob/master/src/main/java/com/comsysto/poc/ao/model/OwnerEntity.java) = Active Objects Entity
110116
* [**`PetEntity`**](https://github.com/comsysto/poc-dockerized-database-integration-tests-atlassian-plugin/blob/master/src/main/java/com/comsysto/poc/ao/model/PetEntity.java) = Active Objects Entity
111-
* [**`PetAndOwnerDataAccessServiceImpl`**](https://github.com/comsysto/poc-dockerized-database-integration-tests-atlassian-plugin/blob/master/src/main/java/com/comsysto/poc/ao/service/PetAndOwnerDataAccessServiceImpl.java) = Data Access API works with ActiveObjects
117+
* [**`PetAndOwnerDataAccessServiceImpl`**](https://github.com/comsysto/poc-dockerized-database-integration-tests-atlassian-plugin/blob/master/src/main/java/com/comsysto/poc/ao/service/PetAndOwnerDataAccessServiceImpl.java) = Data Access API works with ActiveObjects
112118
* Test
113119
* [**`PetAndOwnerDataAccessServiceTest`**](https://github.com/comsysto/poc-dockerized-database-integration-tests-atlassian-plugin/blob/master/src/test/java/ut/com/comsysto/poc/ao/service/PetAndOwnerDataAccessServiceTest.java) = Base test whose test methods are run against different database engines
114120

115121
&nbsp;
116122

117123
### Distinctions
118124

119-
* Why not `atlas-integration-test`?
125+
* Why not `atlas-integration-test`?
120126
* Because even though it is named 'integration-test' it starts a full JIRA instance
121127
and runs tests against it. We only want to instantiate Active Objects with a real database and not the whole JIRA context.
122128
That is why we use the `atlas-unit-test` command.
123129
* Why not use `@ManyToOne` Annotations?
124130
* You can do that if you want a **Left Join**
125-
* The PoC wants to show how to perform an **Inner Join**
131+
* The PoC wants to show how to perform an **Inner Join**
126132

127133

128134
&nbsp;
129135

130136
### License
131137

132-
[MIT](./LICENSE) © [Comsysto Reply GmbH](https://comsystoreply.de)
138+
[MIT](./LICENSE) © [Comsysto Reply GmbH](https://comsystoreply.de)

0 commit comments

Comments
 (0)