Workspace Broker testing
Jonathan Meyer edited this page Jan 30, 2017
·
2 revisions
I need to throw together a workspace real quick to test list_files capability. I can do that with these lines of python code from the REPL:
from storage.test.utils import create_workspace
from datetime import datetime
json_config = {'version':'1.0','broker':{'type':'host','host_path':'/home/ubuntu/test'}}
workspace = create_workspace(name=datetime.utcnow().isoformat(), json_config=json_config)
from storage.test.utils import create_workspace
from datetime import datetime
json_config = {'version':'1.0','broker':{'type':'host','host_path':'/home/ubuntu/workspace/scale'}}
workspace = create_workspace(name=datetime.utcnow().isoformat(), json_config=json_config)
import django
from mock import patch
from storage.models import Workspace
django.setup()
workspace = Workspace.objects.get(pk=3)
with patch.object(Workspace, '_get_volume_path', return_value='/home/workspace/scale') as mock_method:
workspace.list_files(True, None)
- Home
- What's New
-
In-depth Topics
- Enable Scale to run CUDA GPU optimized algorithms
- Enable Scale to store secrets securely
- Test Scale's scan capability on the fly
- Test Scale's workspace broker capability on the fly
- Scale Performance Metrics
- Private docker repository configuration
- Setting up Automated Snapshots for Elasticsearch
- Setting up Cluster Monitoring
- Developer Notes