diff --git a/rally-jobs/rally-neutron.yaml b/rally-jobs/rally-neutron.yaml index 7054ffa3..66efaa77 100644 --- a/rally-jobs/rally-neutron.yaml +++ b/rally-jobs/rally-neutron.yaml @@ -750,3 +750,60 @@ users: tenants: 2 users_per_tenant: 2 + + SwiftObjects.create_container_and_object_then_list_objects: + - + args: + objects_per_container: 2 + object_size: 5120 + runner: + type: "constant" + times: 2 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + roles: + - "admin" + sla: + failure_rate: + max: 0 + + SwiftObjects.create_container_and_object_then_delete_all: + - + args: + objects_per_container: 5 + object_size: 102400 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + roles: + - "admin" + sla: + failure_rate: + max: 0 + + SwiftObjects.create_container_and_object_then_download_object: + - + args: + objects_per_container: 5 + object_size: 1024 + runner: + type: "constant" + times: 6 + concurrency: 3 + context: + users: + tenants: 1 + users_per_tenant: 1 + roles: + - "admin" + sla: + failure_rate: + max: 0 diff --git a/samples/tasks/scenarios/swift/create-container-and-object-then-delete-all.json b/samples/tasks/scenarios/swift/create-container-and-object-then-delete-all.json new file mode 100644 index 00000000..02b67062 --- /dev/null +++ b/samples/tasks/scenarios/swift/create-container-and-object-then-delete-all.json @@ -0,0 +1,24 @@ +{ + "SwiftObjects.create_container_and_object_then_delete_all": [ + { + "args": { + "objects_per_container": 5, + "object_size": 102400 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "roles": [ + "admin" + ] + } + } + ] +} diff --git a/samples/tasks/scenarios/swift/create-container-and-object-then-delete-all.yaml b/samples/tasks/scenarios/swift/create-container-and-object-then-delete-all.yaml new file mode 100644 index 00000000..510af158 --- /dev/null +++ b/samples/tasks/scenarios/swift/create-container-and-object-then-delete-all.yaml @@ -0,0 +1,16 @@ +--- + SwiftObjects.create_container_and_object_then_delete_all: + - + args: + objects_per_container: 5 + object_size: 102400 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + roles: + - "admin" diff --git a/samples/tasks/scenarios/swift/create-container-and-object-then-download-object.json b/samples/tasks/scenarios/swift/create-container-and-object-then-download-object.json new file mode 100644 index 00000000..7b988e4c --- /dev/null +++ b/samples/tasks/scenarios/swift/create-container-and-object-then-download-object.json @@ -0,0 +1,24 @@ +{ + "SwiftObjects.create_container_and_object_then_download_object": [ + { + "args": { + "objects_per_container": 5, + "object_size": 1024 + }, + "runner": { + "type": "constant", + "times": 6, + "concurrency": 3 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "roles": [ + "admin" + ] + } + } + ] +} diff --git a/samples/tasks/scenarios/swift/create-container-and-object-then-download-object.yaml b/samples/tasks/scenarios/swift/create-container-and-object-then-download-object.yaml new file mode 100644 index 00000000..6ea50cf6 --- /dev/null +++ b/samples/tasks/scenarios/swift/create-container-and-object-then-download-object.yaml @@ -0,0 +1,16 @@ +--- + SwiftObjects.create_container_and_object_then_download_object: + - + args: + objects_per_container: 5 + object_size: 1024 + runner: + type: "constant" + times: 6 + concurrency: 3 + context: + users: + tenants: 1 + users_per_tenant: 1 + roles: + - "admin" diff --git a/samples/tasks/scenarios/swift/create-container-and-object-then-list-objects.json b/samples/tasks/scenarios/swift/create-container-and-object-then-list-objects.json new file mode 100644 index 00000000..f807d4b6 --- /dev/null +++ b/samples/tasks/scenarios/swift/create-container-and-object-then-list-objects.json @@ -0,0 +1,24 @@ +{ + "SwiftObjects.create_container_and_object_then_list_objects": [ + { + "args": { + "objects_per_container": 2, + "object_size": 5120 + }, + "runner": { + "type": "constant", + "times": 2, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "roles": [ + "admin" + ] + } + } + ] +} diff --git a/samples/tasks/scenarios/swift/create-container-and-object-then-list-objects.yaml b/samples/tasks/scenarios/swift/create-container-and-object-then-list-objects.yaml new file mode 100644 index 00000000..bc01aa4b --- /dev/null +++ b/samples/tasks/scenarios/swift/create-container-and-object-then-list-objects.yaml @@ -0,0 +1,16 @@ +--- + SwiftObjects.create_container_and_object_then_list_objects: + - + args: + objects_per_container: 2 + object_size: 5120 + runner: + type: "constant" + times: 2 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + roles: + - "admin" diff --git a/tests/unit/fakes.py b/tests/unit/fakes.py index b708a8b0..6554f2a9 100644 --- a/tests/unit/fakes.py +++ b/tests/unit/fakes.py @@ -892,7 +892,7 @@ class FakeObjectManager(FakeManager): def put_object(self, container_name, object_name, content, **kwargs): container = self.find(name=container_name) - if container is None or object_name in container.items: + if container is None: raise swift_exceptions.ClientException("Object PUT failed") container.items[object_name] = content return mock.MagicMock()