Skip to content

Commit

Permalink
Merge pull request #99 from reportportal/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
HardNorth committed Feb 8, 2024
2 parents 7375465 + f37aaea commit 7450609
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 19 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up JDK 1.8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
Expand All @@ -47,4 +47,6 @@ jobs:
run: ./gradlew build

- name: Codecov upload
run: bash <(curl -s https://codecov.io/bash)
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Generate versions
uses: HardNorth/github-version-generate@v1
Expand All @@ -50,7 +50,7 @@ jobs:
version-file-extraction-pattern: ${{ env.VERSION_EXTRACT_PATTERN }}

- name: Set up JDK 1.8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:

- name: Checkout develop branch
if: ${{ github.ref }} == 'master'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: 'develop'
fetch-depth: 0
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## [Unreleased]
### Changed
- Client version updated on [5.2.4](https://github.com/reportportal/client-java/releases/tag/5.2.4), by @HardNorth
### Removed
- `commons-model` dependency to rely on `clinet-java` exclusions in security fixes, by @HardNorth

## [5.2.0]
### Changed
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ repositories {
}

dependencies {
api 'com.epam.reportportal:client-java:5.2.1'
api 'com.epam.reportportal:commons-model:5.0.0'
api 'com.epam.reportportal:client-java:5.2.4'
api 'com.google.code.findbugs:jsr305:3.0.2'
api 'info.cukes:gherkin:2.12.2'

Expand Down
22 changes: 11 additions & 11 deletions src/test/java/com/epam/reportportal/cucumber/EmbeddingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,28 @@ public class EmbeddingTest {
@CucumberOptions(features = "src/test/resources/features/embedding/ImageEmbeddingFeature.feature", glue = {
"com.epam.reportportal.cucumber.integration.embed.image" }, plugin = { "pretty",
"com.epam.reportportal.cucumber.integration.TestStepReporter" })
public static class ImageStepReporter extends AbstractTestNGCucumberTests {
public static class ImageStepReporterTest extends AbstractTestNGCucumberTests {

}

@CucumberOptions(features = "src/test/resources/features/embedding/TextEmbeddingFeature.feature", glue = {
"com.epam.reportportal.cucumber.integration.embed.text" }, plugin = { "pretty",
"com.epam.reportportal.cucumber.integration.TestStepReporter" })
public static class TextStepReporter extends AbstractTestNGCucumberTests {
public static class TextStepReporterTest extends AbstractTestNGCucumberTests {

}

@CucumberOptions(features = "src/test/resources/features/embedding/PdfEmbeddingFeature.feature", glue = {
"com.epam.reportportal.cucumber.integration.embed.pdf" }, plugin = { "pretty",
"com.epam.reportportal.cucumber.integration.TestStepReporter" })
public static class PdfStepReporter extends AbstractTestNGCucumberTests {
public static class PdfStepReporterTest extends AbstractTestNGCucumberTests {

}

@CucumberOptions(features = "src/test/resources/features/embedding/ArchiveEmbeddingFeature.feature", glue = {
"com.epam.reportportal.cucumber.integration.embed.zip" }, plugin = { "pretty",
"com.epam.reportportal.cucumber.integration.TestStepReporter" })
public static class ZipStepReporter extends AbstractTestNGCucumberTests {
public static class ZipStepReporterTest extends AbstractTestNGCucumberTests {

}

Expand Down Expand Up @@ -118,7 +118,7 @@ public void setup() {

@Test
public void verify_image_embedding() {
TestUtils.runTests(ImageStepReporter.class);
TestUtils.runTests(ImageStepReporterTest.class);

ArgumentCaptor<List<MultipartBody.Part>> logCaptor = ArgumentCaptor.forClass(List.class);
verify(client, atLeastOnce()).log(logCaptor.capture());
Expand All @@ -132,7 +132,7 @@ public void verify_image_embedding() {

@Test
public void verify_text_embedding() {
TestUtils.runTests(TextStepReporter.class);
TestUtils.runTests(TextStepReporterTest.class);

ArgumentCaptor<List<MultipartBody.Part>> logCaptor = ArgumentCaptor.forClass(List.class);
verify(client, atLeastOnce()).log(logCaptor.capture());
Expand All @@ -145,8 +145,8 @@ public void verify_text_embedding() {
}

@Test
public void verify_pfd_embedding() {
TestUtils.runTests(PdfStepReporter.class);
public void verify_pdf_embedding() {
TestUtils.runTests(PdfStepReporterTest.class);

ArgumentCaptor<List<MultipartBody.Part>> logCaptor = ArgumentCaptor.forClass(List.class);
verify(client, atLeastOnce()).log(logCaptor.capture());
Expand All @@ -155,19 +155,19 @@ public void verify_pfd_embedding() {
List<String> types = getTypes(logCaptor, logs);

assertThat(types, hasSize(3));
assertThat(types, containsInAnyOrder("application/pdf", "image/png", "application/octet-stream"));
assertThat(types, containsInAnyOrder("application/pdf", "image/png", "application/pdf"));
}

@Test
public void verify_archive_embedding() {
TestUtils.runTests(ZipStepReporter.class);
TestUtils.runTests(ZipStepReporterTest.class);

ArgumentCaptor<List<MultipartBody.Part>> logCaptor = ArgumentCaptor.forClass(List.class);
verify(client, atLeastOnce()).log(logCaptor.capture());
List<SaveLogRQ> logs = filterLogs(logCaptor, l -> Objects.nonNull(l.getFile()));

List<String> types = getTypes(logCaptor, logs);
assertThat(types, hasSize(3));
assertThat(types, containsInAnyOrder("application/zip", "image/png", "application/octet-stream"));
assertThat(types, containsInAnyOrder("application/zip", "image/png", "application/zip"));
}
}

0 comments on commit 7450609

Please sign in to comment.