Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
martingrossmann committed Jun 27, 2022
2 parents 79aec65 + 2a7b14b commit 87bc5bc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Testerra TeamCity Connector
# TeamCity Connector

<p align="center">
<a href="https://mvnrepository.com/artifact/io.testerra/teamcity-connector" title="MavenCentral"><img src="https://img.shields.io/maven-central/v/io.testerra/teamcity-connector/1?label=Maven%20Central"></a>
Expand Down Expand Up @@ -30,10 +30,11 @@ It will register automatically by using the Testerra ModuleHook.

### Requirements

| TeamCity connector | Testerra |
| -------------------- | --------------|
| `1.0` | `1.0.0..1.8` |
| `1.1` | `1.9` |
| TeamCity connector | Testerra |
|--------------------|----------------|
| `1.0` | `1.0.0..1.8` |
| `1.1` | `1.9` |
| `2.0-RC-2` | `>= 2.0-RC-19` |

### Usage

Expand All @@ -42,7 +43,7 @@ Include the following dependency in your project.
Gradle:

````groovy
implementation 'io.testerra:teamcity-connector:1.0'
implementation 'io.testerra:teamcity-connector:2.0-RC-2'
````

Maven:
Expand All @@ -52,7 +53,7 @@ Maven:
<dependency>
<groupId>io.testerra</groupId>
<artifactId>teamcity-connector</artifactId>
<version>1.0</version>
<version>2.0-RC-2</version>
</dependency>
````

Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ apply plugin: 'io.codearte.nexus-staging'

ext {
// Minimum required Testerra version
testerraCompileVersion = '1.9'
testerraCompileVersion = '2-SNAPSHOT'
// Unit tests use the latest Testerra version
testerraTestVersion = '[1.9,2-SNAPSHOT)'
moduleVersion = '1-SNAPSHOT'
testerraTestVersion = '[2,3-SNAPSHOT)'
moduleVersion = '2-SNAPSHOT'
if (System.properties.containsKey('moduleVersion')) {
moduleVersion = System.getProperty('moduleVersion')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package eu.tsystems.mms.tic.testerra.plugins.teamcity.hooks;

import com.google.common.eventbus.EventBus;
import com.google.inject.AbstractModule;
import eu.tsystems.mms.tic.testerra.plugins.teamcity.listener.TeamCityEventListener;
import eu.tsystems.mms.tic.testerra.plugins.teamcity.worker.TeamCityStatusReportWorker;
import eu.tsystems.mms.tic.testframework.hooks.ModuleHook;
Expand All @@ -30,7 +31,7 @@
*
* @author Eric Kubenka
*/
public class TeamCityHook implements ModuleHook {
public class TeamCityHook extends AbstractModule implements ModuleHook {

@Override
public void init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
import com.google.common.eventbus.Subscribe;
import eu.tsystems.mms.tic.testerra.plugins.teamcity.TeamCityBuildStatus;
import eu.tsystems.mms.tic.testerra.plugins.teamcity.TeamCityMessagePusher;
import eu.tsystems.mms.tic.testframework.common.PropertyManager;
import eu.tsystems.mms.tic.testframework.constants.TesterraProperties;
import eu.tsystems.mms.tic.testframework.common.Testerra;
import eu.tsystems.mms.tic.testframework.events.ExecutionFinishEvent;
import eu.tsystems.mms.tic.testframework.report.FailureCorridor;
import eu.tsystems.mms.tic.testframework.report.TestStatusController;
import eu.tsystems.mms.tic.testframework.report.ITestStatusController;
import eu.tsystems.mms.tic.testframework.report.TesterraListener;
import eu.tsystems.mms.tic.testframework.report.utils.ExecutionContextController;

Expand All @@ -39,12 +38,12 @@
public class TeamCityStatusReportWorker implements ExecutionFinishEvent.Listener {

private static final TeamCityMessagePusher messagePusher = new TeamCityMessagePusher();
private static final boolean FAILURE_CORRIDOR_ACTIVE = PropertyManager.getBooleanProperty(TesterraProperties.FAILURE_CORRIDOR_ACTIVE, false);
private static final boolean FAILURE_CORRIDOR_ACTIVE = Testerra.Properties.FAILURE_CORRIDOR_ACTIVE.asBool();

@Override
@Subscribe
public void onExecutionFinish(ExecutionFinishEvent event) {
TestStatusController testStatusController = TesterraListener.getTestStatusController();
ITestStatusController testStatusController = TesterraListener.getTestStatusController();

String statusMessage = ExecutionContextController.getCurrentExecutionContext().runConfig.getReportName() + " " +
ExecutionContextController.getCurrentExecutionContext().runConfig.RUNCFG + ": ";
Expand Down

0 comments on commit 87bc5bc

Please sign in to comment.