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

FixPlugin: Compare test files in course of building the TestResults by full paths #478

Merged
merged 7 commits into from
Jan 18, 2023

Conversation

Cheshiriks
Copy link
Member

@Cheshiriks Cheshiriks commented Jan 16, 2023

  • Added test for tests with the same name

Closes #473

…y full paths

* Added test fore tests with the same name
Closes #473
@github-actions
Copy link

github-actions bot commented Jan 16, 2023

JUnit Tests (Linux, EnricoMi/publish-unit-test-result-action@v1)

243 tests  +2   219 ✔️ +2   8m 53s ⏱️ -11s
  48 suites ±0     24 💤 ±0 
  48 files   ±0       0 ±0 

Results for commit 823a405. ± Comparison against base commit e5ced44.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jan 16, 2023

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v1)

243 tests  +2   219 ✔️ +2   14m 56s ⏱️ +56s
  48 suites ±0     24 💤 ±0 
  48 files   ±0       0 ±0 

Results for commit 823a405. ± Comparison against base commit e5ced44.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jan 16, 2023

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v1)

243 tests  +2   219 ✔️ +2   15m 3s ⏱️ + 3m 42s
  48 suites ±0     24 💤 ±0 
  48 files   ±0       0 ±0 

Results for commit 823a405. ± Comparison against base commit e5ced44.

♻️ This comment has been updated with latest results.

…y full paths

* Added test fore tests with the same name
Closes #473
…y full paths

* Added test fore tests with the same name
Closes #473
@Cheshiriks Cheshiriks closed this Jan 16, 2023
@Cheshiriks Cheshiriks reopened this Jan 16, 2023
@codecov
Copy link

codecov bot commented Jan 16, 2023

Codecov Report

Merging #478 (823a405) into main (e5ced44) will increase coverage by 0.23%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main     #478      +/-   ##
============================================
+ Coverage     47.02%   47.25%   +0.23%     
- Complexity      152      154       +2     
============================================
  Files            53       53              
  Lines          1814     1822       +8     
  Branches        313      314       +1     
============================================
+ Hits            853      861       +8     
  Misses          831      831              
  Partials        130      130              
Flag Coverage Δ
unittests 47.25% <100.00%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...tlin/com/saveourtool/save/plugins/fix/FixPlugin.kt 58.62% <100.00%> (+1.99%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

…y full paths

* Added test fore tests with the same name
Closes #473
…y full paths

* Added test fore tests with the same name
Closes #473
…y full paths

* Added test fore tests with the same name
Closes #473
.substringAfter(Path.DIRECTORY_SEPARATOR)
.toPath()

val testCopy = test.createRelativePathToTheRoot(testConfig.getRootConfig().directory).toPath()
Copy link
Member

Choose a reason for hiding this comment

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

Should it be called testCopy? I think it original test file

@@ -247,6 +247,17 @@ class FixPlugin(
)
}

private fun isComparingTestAndCopy(test: Path, testCopy: Path): Boolean {
val testCopyPath = testCopy.relativeTo(FileSystem.SYSTEM_TEMPORARY_DIRECTORY)
Copy link
Member

Choose a reason for hiding this comment

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

Could you also write a comments, why do we calculate paths in this way?
Some words like: testCopyPath stored in tmpDir, holdind the whole hierarchy of original file
while test file comes to us with path , starting from testRootPath, so we compare them in such way

@Cheshiriks Cheshiriks merged commit b00599a into main Jan 18, 2023
@Cheshiriks Cheshiriks deleted the bugfix/relative-path-fix-plugin branch January 18, 2023 10:56
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.

FixPlugin: Compare test files in course of building the TestResults by full paths
2 participants