From 179dc15b3c53dd6be925afffc1ca7333bf06f865 Mon Sep 17 00:00:00 2001 From: Lucio Lelii Date: Mon, 24 Sep 2018 14:42:00 +0000 Subject: [PATCH] git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/Common/storagehub-client@171651 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/proxies/DefaultWorkspaceManager.java | 2 +- src/test/java/org/gcube/data/access/fs/Items.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/common/storagehub/client/proxies/DefaultWorkspaceManager.java b/src/main/java/org/gcube/common/storagehub/client/proxies/DefaultWorkspaceManager.java index 92b063c..9419c17 100644 --- a/src/main/java/org/gcube/common/storagehub/client/proxies/DefaultWorkspaceManager.java +++ b/src/main/java/org/gcube/common/storagehub/client/proxies/DefaultWorkspaceManager.java @@ -219,7 +219,7 @@ public class DefaultWorkspaceManager implements WorkspaceManagerClient { public Void call(GXWebTargetAdapterRequest manager) throws Exception { GXWebTargetAdapterRequest myManager = manager.path("trash").path("empty"); - GXInboundResponse response = myManager.delete(); + GXInboundResponse response = myManager.setAcceptedResponseType(MediaType.TEXT_PLAIN_TYPE).delete(); if (response.hasGXError()) throw response.getException(); diff --git a/src/test/java/org/gcube/data/access/fs/Items.java b/src/test/java/org/gcube/data/access/fs/Items.java index 659cac9..b6112a7 100644 --- a/src/test/java/org/gcube/data/access/fs/Items.java +++ b/src/test/java/org/gcube/data/access/fs/Items.java @@ -66,6 +66,15 @@ public class Items { } + @Test + public void emptyTrash() throws Exception { + StorageHubClient shc = new StorageHubClient(); + + shc.emptyTrash(); + + } + + @Test public void uploadArchive() throws Exception {