-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1285 from rpm-software-management/clean-test-suite
Clean test suite
- Loading branch information
Showing
91 changed files
with
4,196 additions
and
981 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/var/log/myapp/*.log { | ||
su appuser appuser | ||
weekly | ||
rotate 4 | ||
compress | ||
|
||
delaycompress | ||
missingok | ||
create 644 appuser appuser | ||
} | ||
|
||
/var/log/myapp/*.log { | ||
su appuser2 appuser2 | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/var/log/myapp/*.log { | ||
su appuser2 appuser2 | ||
} | ||
|
||
/tmp/foo/my.log { | ||
# comment | ||
su appuser2 appuser2 | ||
} | ||
|
||
/tmp/foo2/my.log { | ||
su appuser2 appuser2 | ||
} |
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# coding=utf-8 | ||
""" | ||
Provides crossplatform checking of current power source, battery warning level and battery time remaining estimate. | ||
Allows you to add observer for power notifications if platform supports it. | ||
Usage: | ||
from power import PowerManagement, PowerManagementObserver # Automatically imports platform-specific implementation | ||
class Observer(PowerManagementObserver): | ||
def on_power_sources_change(self, power_management): | ||
print "Power sources did change." | ||
def on_time_remaining_change(self, power_management): | ||
print "Time remaining did change." | ||
# class Observer(object): | ||
# ... | ||
# PowerManagementObserver.register(Observer) | ||
""" | ||
__author__ = '[email protected]' | ||
__version__ = '1.1' | ||
|
||
from sys import platform | ||
from power.common import * | ||
|
||
|
||
try: | ||
if platform.startswith('darwin'): | ||
from power.darwin import PowerManagement | ||
elif platform.startswith('win32'): | ||
from power.win32 import PowerManagement | ||
elif platform.startswith('linux'): | ||
from power.linux import PowerManagement | ||
else: | ||
raise RuntimeError("{platform} is not supported.".format(platform=platform)) | ||
except RuntimeError as e: | ||
import warnings | ||
warnings.warn("Unable to load PowerManagement for {platform}. No-op PowerManagement class is used: {error}".format(error=str(e), platform=platform)) | ||
from power.common import PowerManagementNoop as PowerManagement |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.