Fix FreeBSD: Add Support for Swap Output on TrueNas Core#427
Merged
kesselb merged 2 commits intonextcloud:masterfrom Mar 7, 2023
ConstrictM:master
Merged
Fix FreeBSD: Add Support for Swap Output on TrueNas Core#427kesselb merged 2 commits intonextcloud:masterfrom ConstrictM:master
kesselb merged 2 commits intonextcloud:masterfrom
ConstrictM:master
Conversation
Signed-off-by: Matthew Wener <matthew@wener.org>
Collaborator
|
Thanks for your pull request 👍 Can you add a test for it? |
Contributor
Author
|
@kesselb I'm not sure if I did that correctly, but I added a test. Please let me know if I have to correct it. |
kesselb
approved these changes
Mar 7, 2023
Collaborator
|
Thank you 👍 |
artonge
approved these changes
Mar 7, 2023
artonge
reviewed
Mar 7, 2023
Collaborator
|
Please apply the patch to fix the unit tests: Index: tests/lib/FreeBSDTest.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/tests/lib/FreeBSDTest.php b/tests/lib/FreeBSDTest.php
--- a/tests/lib/FreeBSDTest.php (revision beacafe4e724b453942fedfeb49fe4da378030f3)
+++ b/tests/lib/FreeBSDTest.php (date 1678187528355)
@@ -99,10 +99,10 @@
public function testGetMemoryTruenasSwapinfo(): void {
$this->os->method('executeCommand')
- ->willReturnMap(
+ ->willReturnMap([
['/usr/sbin/swapinfo -k', file_get_contents(__DIR__ . '/../data/truenas_core_swapinfo')],
['/sbin/sysctl -n hw.realmem hw.pagesize vm.stats.vm.v_inactive_count vm.stats.vm.v_cache_count vm.stats.vm.v_free_count', file_get_contents(__DIR__ . '/../data/truenas_core_meminfo')],
- );
+ ]);
$memory = $this->os->getMemory();
|
Signed-off-by: Matthew Wener <matthew@wener.org>
Contributor
Author
@kesselb Done |
Collaborator
|
/backport to stable26 |
Collaborator
|
/backport to stable25 |
This was referenced Mar 7, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example Output on FreeBSD:
Example Output on TrueNAS CORE:
Broken:

Fixed:
