Skip to content

Commit

Permalink
Remove embedded webdav tweaking (CTERA-137).
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkins committed Jan 19, 2024
1 parent 45f87da commit 28e6002
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions ctera/src/main/java/ch/cyberduck/core/ctera/CteraSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import ch.cyberduck.core.features.Delete;
import ch.cyberduck.core.features.Directory;
import ch.cyberduck.core.features.Lock;
import ch.cyberduck.core.features.Metadata;
import ch.cyberduck.core.features.Move;
import ch.cyberduck.core.features.Read;
import ch.cyberduck.core.features.Timestamp;
Expand Down Expand Up @@ -110,17 +109,11 @@ public class CteraSession extends DAVSession {

private final ListService list = new CteraListService(this);

// TODO CTERA-136 temporary workaround for mock tests
private static boolean embeddedWebDAV = false;

public CteraSession(final Host host, final X509TrustManager trust, final X509KeyManager key) {
super(host, trust, key);
}

public static void tweakEmbeddedWebDAV() {
// TODO CTERA-136 temporary workaround for mock tests
embeddedWebDAV = true;
}

@Override
protected DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt, final CancelCallback cancel) {
Expand All @@ -132,10 +125,6 @@ protected DAVClient connect(final Proxy proxy, final HostKeyCallback key, final

@Override
public void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException {
if(embeddedWebDAV || host.getProperty("embeddedWebDAV").equalsIgnoreCase("true")) {
super.login(proxy, prompt, cancel);
return;
}
final Credentials credentials = host.getCredentials();
if(StringUtils.isBlank(credentials.getToken())) {
final CteraTokens tokens = this.getTokens(credentials, prompt, cancel);
Expand Down Expand Up @@ -204,10 +193,6 @@ public <T> T _getFeature(final Class<T> type) {
if(type == Timestamp.class) {
return null;
}
// TODO CTERA-137 undo workaround to enable propfind for embeddedWebDAV testing
if(type == Metadata.class && !(embeddedWebDAV || host.getProperty("embeddedWebDAV").equalsIgnoreCase("true"))) {
return null;
}
if(type == CustomActions.class) {
return (T) new CteraCustomActions(this);
}
Expand Down

0 comments on commit 28e6002

Please sign in to comment.