Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #47 from reportportal/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
HardNorth authored Feb 8, 2024
2 parents 3378954 + 87e6dcb commit ebb5426
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 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 "io.cucumber:cucumber-java:${project.cucumber_version}"

Expand Down
20 changes: 10 additions & 10 deletions src/test/java/com/epam/reportportal/cucumber/EmbeddingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,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 @@ -117,7 +117,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 @@ -131,7 +131,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,7 +145,7 @@ public void verify_text_embedding() {

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

ArgumentCaptor<List<MultipartBody.Part>> logCaptor = ArgumentCaptor.forClass(List.class);
verify(client, atLeastOnce()).log(logCaptor.capture());
Expand All @@ -154,19 +154,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 ebb5426

Please sign in to comment.