Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugin-rest-api] Allow to work with archives from any source #2797

Merged
merged 1 commit into from
May 27, 2022

Conversation

ikalinin1
Copy link
Member

@ikalinin1 ikalinin1 commented May 25, 2022

Closes #2743

@codecov
Copy link

codecov bot commented May 25, 2022

Codecov Report

Merging #2797 (9f54015) into master (8b6a1f6) will decrease coverage by 7.71%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #2797      +/-   ##
============================================
- Coverage     96.63%   88.91%   -7.72%     
- Complexity     5638     5853     +215     
============================================
  Files           797      798       +1     
  Lines         16076    16107      +31     
  Branches       1057     1058       +1     
============================================
- Hits          15535    14322    -1213     
- Misses          428     1652    +1224     
- Partials        113      133      +20     
Impacted Files Coverage Δ
...n/java/org/vividus/archive/steps/ArchiveSteps.java 100.00% <100.00%> (ø)
...vividus/steps/api/HttpResponseValidationSteps.java 99.09% <100.00%> (+0.02%) ⬆️
.../src/main/java/org/vividus/results/model/Node.java 0.00% <0.00%> (-100.00%) ⬇️
...rc/main/java/org/vividus/transformer/JoinMode.java 0.00% <0.00%> (-100.00%) ⬇️
...c/main/java/org/vividus/transformer/MergeMode.java 0.00% <0.00%> (-100.00%) ⬇️
.../main/java/org/vividus/runner/BddStepsCounter.java 0.00% <0.00%> (-100.00%) ⬇️
...in/java/org/vividus/results/model/NodeContext.java 0.00% <0.00%> (-100.00%) ⬇️
...n/java/org/vividus/runner/BddScenariosCounter.java 0.00% <0.00%> (-100.00%) ⬇️
...n/java/org/vividus/runner/KnownIssueValidator.java 0.00% <0.00%> (-100.00%) ⬇️
...java/org/vividus/expression/HashAlgorithmType.java 0.00% <0.00%> (-100.00%) ⬇️
... and 53 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

docs/modules/plugins/pages/plugin-rest-api.adoc Outdated Show resolved Hide resolved
docs/modules/plugins/pages/plugin-rest-api.adoc Outdated Show resolved Hide resolved
Optional.ofNullable(zipEntries.get(path)).ifPresentOrElse(
data -> variableContext.putVariable(arcVar.getScopes(), arcVar.getVariableName(),
arcVar.getOutputFormat().convert(data)),
() -> softAssert.recordFailedAssertion(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm thinking about letting the end user know what entries we have inside the archive

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it could be an overkill if archive contains many entries

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@valfirst I didn't suggest to write print out archive entries for each assertion, this was the idea in general

{
List<String> expectedEntries = parameters.stream().map(ArchiveVariable::getPath).collect(Collectors.toList());
Map<String, byte[]> zipEntries = ZipUtils.readZipEntriesFromBytes(archiveData.getBytes(),
expectedEntries::contains);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there are no zipEntries does it make sense to skip the rest of the logic and record just smth like "archive is empty"? and in the step below

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, we need a failed assertion for each row in the table in this case

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the point to find entries in empty archive?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need a failed assertion for each row in the table in this case

@sonarcloud
Copy link

sonarcloud bot commented May 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@valfirst valfirst merged commit a06a46d into master May 27, 2022
@valfirst valfirst deleted the archive branch May 27, 2022 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement archive management steps for Saturn Azure Storage Account
3 participants