Use stestr instead of testrepository

This patch removes dependencies on testrepository as
stackviz is using stestr instead.

Closes-Bug: 1735667
Change-Id: I1e1de567fae7a2f7985f51e35d71201be2ab787f
This commit is contained in:
lpiwowar 2021-06-15 16:24:02 +02:00
parent 9c755dbe5b
commit 19c3056754
5 changed files with 15 additions and 16 deletions

View File

@ -27,7 +27,7 @@ directory will be created. One of the following input options must be chosen:
Instructs stackviz-export to read a subunit stream from stdin.
**-r, --repository REPOSITORY**
Specifies a :code:`.testrepository` to read subunit streams from. This
Specifies a :code:`.stestr` to read subunit streams from. This
argument can be used multiple times to specify additional repositories.
Stackviz also visualizes machine utilization statistics using dstat. To attach

View File

@ -1,6 +1,5 @@
python-subunit>=0.0.18
testtools>=0.9.30
testrepository>=0.0.18
oslo.db>=6.0.0;python_version>='3.6'
oslo.db==6.0.0;python_version<='3.5'
six

View File

@ -227,7 +227,7 @@ def main():
help="Include the given direct subunit stream; can be "
"used multiple times.")
parser.add_argument("-r", "--repository",
help="A directory containing a `.testrepository` to "
help="A directory containing a `.stestr` to "
"include; can be used multiple times.")
parser.add_argument("-i", "--stdin",
help="Read a direct subunit stream from standard "

View File

@ -27,8 +27,8 @@ from testtools import StreamResult
from testtools import StreamSummary
from testtools import StreamToDict
from testrepository.repository.file import RepositoryFactory
from testrepository.repository.file import RepositoryNotFound
from stestr.repository.abstract import RepositoryNotFound
from stestr.repository.file import RepositoryFactory
NAME_SCENARIO_PATTERN = re.compile(r'^(.+) \((.+)\)$')
@ -177,7 +177,7 @@ def get_providers(repository_paths=None, stream_paths=None, stdin=False):
"""Loads all test providers from locations configured in settings.
:param repository_paths: a list of directory paths containing
'.testrepository' folders to read
'.stestr' folders to read
:param stream_paths: a list of paths to direct subunit streams
:param stdin: if true, read a subunit stream from standard input
:return: a dict of loaded provider names and their associated

View File

@ -17,19 +17,19 @@ describe('Unit: DatasetService', function() {
"content_type": "text/csv", "artifact_name": "dstat-csv.txt"
}, {
"artifact_type": "subunit", "primary": true,
"path": "testrepository.subunit-0-raw.json",
"path": "stestr.subunit-0-raw.json",
"content_type": "application/json",
"artifact_name": "testrepository.subunit"
"artifact_name": "stestr.subunit"
}, {
"artifact_type": "subunit-details", "primary": false,
"path": "testrepository.subunit-0-details.json",
"path": "stestr.subunit-0-details.json",
"content_type": "application/json",
"artifact_name": "testrepository.subunit"
"artifact_name": "stestr.subunit"
}, {
"artifact_type": "subunit-stats", "primary": false,
"path": "testrepository.subunit-0-stats.json",
"path": "stestr.subunit-0-stats.json",
"content_type": "application/json",
"artifact_name": "testrepository.subunit"
"artifact_name": "stestr.subunit"
}
]
}]
@ -62,7 +62,7 @@ describe('Unit: DatasetService', function() {
it('should only have valid primary artifacts', function() {
service.groups(true).then(function(groups) {
expect(groups.length).toEqual(1);
expect(groups).toContain('testrepository.subunit');
expect(groups).toContain('stestr.subunit');
}, function() {
fail('callback should return');
});
@ -71,7 +71,7 @@ describe('Unit: DatasetService', function() {
});
it('should find all artifacts matching a particular name', function() {
service.artifacts('testrepository.subunit').then(function(artifacts) {
service.artifacts('stestr.subunit').then(function(artifacts) {
expect(artifacts.length).toEqual(3);
}, function() {
fail('callback should return');
@ -81,11 +81,11 @@ describe('Unit: DatasetService', function() {
});
it('should load an artifact', function() {
httpBackend.whenGET('data/testrepository.subunit-0-raw.json').respond({
httpBackend.whenGET('data/stestr.subunit-0-raw.json').respond({
mock: true
});
service.artifact('testrepository.subunit', 'subunit').then(function(resp) {
service.artifact('stestr.subunit', 'subunit').then(function(resp) {
expect(resp.data).toEqual({ mock: true });
}, function(ex) {
fail('promise should return successfully: ' + ex);