-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement support for gzipped stream for RucioConMon
- Loading branch information
Showing
3 changed files
with
76 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env python | ||
""" | ||
_RucioConMon_t_ | ||
Unit tests for RucioConMon WMCore Service class | ||
""" | ||
|
||
import unittest | ||
|
||
from nose.plugins.attrib import attr | ||
|
||
from WMCore.Services.RucioConMon.RucioConMon import RucioConMon | ||
|
||
|
||
class RucioConMonTest(unittest.TestCase): | ||
""" | ||
Unit tests for RucioConMon Service module | ||
""" | ||
|
||
@attr("integration") | ||
def testGetRSEUnmerged(self): | ||
""" | ||
Test getRSEUnmerged method using both zipped and unzipped requests | ||
This test uses specific rse name which can be changed to any other RSE. | ||
""" | ||
url = "https://cmsweb.cern.ch/rucioconmon/WM/files?rse=T2_TR_METU&format=raw" | ||
mgr = RucioConMon("https://cmsweb.cern.ch/rucioconmon") | ||
rseName = "T2_TR_METU" | ||
dataUnzipped = mgr.getRSEUnmerged(rseName, zipped=False) | ||
dataZipped = mgr.getRSEUnmerged(rseName, zipped=True) | ||
self.assertTrue(dataUnzipped == dataZipped) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |