Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
6f7c2d0c
Commit
6f7c2d0c
authored
Nov 06, 2019
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added MockConnectionFactory to run tests
parent
1ed6f2d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
3 deletions
+41
-3
pom.xml
drip-manager/pom.xml
+6
-1
MongoConfig.java
.../test/java/nl/uva/sne/drip/configuration/MongoConfig.java
+2
-1
RabbitMQConfig.java
...st/java/nl/uva/sne/drip/configuration/RabbitMQConfig.java
+33
-0
ServiceTests.java
...r/src/test/java/nl/uva/sne/drip/service/ServiceTests.java
+0
-1
No files found.
drip-manager/pom.xml
View file @
6f7c2d0c
...
...
@@ -50,7 +50,6 @@
<dependency>
<groupId>
javax.xml.bind
</groupId>
<artifactId>
jaxb-api
</artifactId>
<version>
2.3.1
</version>
</dependency>
<dependency>
<groupId>
com.sun.xml.bind
</groupId>
...
...
@@ -111,6 +110,12 @@
<artifactId>
de.flapdoodle.embed.mongo
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
com.github.fridujo
</groupId>
<artifactId>
rabbitmq-mock
</artifactId>
<version>
1.0.12
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
nl.uva.sne.drip
</groupId>
<artifactId>
drip-commons
</artifactId>
...
...
drip-manager/src/test/java/nl/uva/sne/drip/configuration/MongoConfig.java
View file @
6f7c2d0c
...
...
@@ -26,7 +26,8 @@ import org.springframework.data.mongodb.config.AbstractMongoConfiguration;
* @author S. Koulouzis
*/
@Configuration
@ComponentScan
(
basePackages
=
{
"nl.uva.sne.drip"
,
"nl.uva.sne.drip.api"
,
"nl.uva.sne.drip.configuration"
,
"nl.uva.sne.drip.dao"
,
"nl.uva.sne.drip.model"
,
"nl.uva.sne.drip.service"
})
@ComponentScan
(
basePackages
=
{
"nl.uva.sne.drip"
,
"nl.uva.sne.drip.api"
,
"nl.uva.sne.drip.configuration"
,
"nl.uva.sne.drip.dao"
,
"nl.uva.sne.drip.model"
,
"nl.uva.sne.drip.service"
})
public
class
MongoConfig
extends
AbstractMongoConfiguration
{
public
static
int
MONGO_TEST_PORT
=
12345
;
...
...
drip-manager/src/test/java/nl/uva/sne/drip/configuration/RabbitMQConfig.java
0 → 100644
View file @
6f7c2d0c
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
nl
.
uva
.
sne
.
drip
.
configuration
;
import
com.github.fridujo.rabbitmq.mock.MockConnection
;
import
com.github.fridujo.rabbitmq.mock.MockConnectionFactory
;
import
nl.uva.sne.drip.configuration.*
;
import
com.rabbitmq.client.ConnectionFactory
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
/**
*
* @author S. Koulouzis
*/
@Configuration
public
class
RabbitMQConfig
{
@Bean
public
ConnectionFactory
connectionFactory
()
{
MockConnectionFactory
connectionFactory
=
new
MockConnectionFactory
();
connectionFactory
.
setHost
(
"localhost"
);
connectionFactory
.
setUsername
(
"guest"
);
connectionFactory
.
setPassword
(
"guest"
);
connectionFactory
.
setPort
(
5555
);
return
connectionFactory
;
}
}
drip-manager/src/test/java/nl/uva/sne/drip/service/ServiceTests.java
View file @
6f7c2d0c
...
...
@@ -67,7 +67,6 @@ public class ServiceTests {
@Autowired
CredentialService
credentialService
;
private
String
credentialID
;
@Autowired
ProvisionerService
provisionService
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment