use of ch.cyberduck.core.DisabledHostKeyCallback in project cyberduck by iterate-ch.
the class AbstractBrickTest method setup.
@Before
public void setup() throws Exception {
final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Collections.singleton(new BrickProtocol())));
final Profile profile = new ProfilePlistReader(factory).read(this.getClass().getResourceAsStream("/Brick.cyberduckprofile"));
final Host host = new Host(profile, "mountainduck.files.com", new Credentials(System.getProperties().getProperty("brick.user"), System.getProperties().getProperty("brick.password")));
session = new BrickSession(host, new DefaultX509TrustManager(), new DefaultX509KeyManager());
final LoginConnectionService login = new LoginConnectionService(new DisabledLoginCallback() {
@Override
public Credentials prompt(final Host bookmark, final String title, final String reason, final LoginOptions options) {
fail(reason);
return null;
}
}, new DisabledHostKeyCallback(), new DisabledPasswordStore(), new DisabledProgressListener());
login.check(session, new DisabledCancelCallback());
}
use of ch.cyberduck.core.DisabledHostKeyCallback in project cyberduck by iterate-ch.
the class AbtractBoxTest method setup.
@Before
public void setup() throws Exception {
final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Collections.singleton(new BoxProtocol())));
final Profile profile = new ProfilePlistReader(factory).read(this.getClass().getResourceAsStream("/Box.cyberduckprofile"));
final Host host = new Host(profile, profile.getDefaultHostname(), new Credentials("cyberduck"));
session = new BoxSession(host, new DefaultX509TrustManager(), new DefaultX509KeyManager());
final LoginConnectionService login = new LoginConnectionService(new DisabledLoginCallback() {
@Override
public Credentials prompt(final Host bookmark, final String title, final String reason, final LoginOptions options) {
fail(reason);
return null;
}
}, new DisabledHostKeyCallback(), new TestPasswordStore(), new DisabledProgressListener());
login.check(session, new DisabledCancelCallback());
}
use of ch.cyberduck.core.DisabledHostKeyCallback in project cyberduck by iterate-ch.
the class RemoteProfilesFinderTest method find.
@Test
public void find() throws Exception {
final ProtocolFactory protocols = new ProtocolFactory(new HashSet<>(Arrays.asList(new TestProtocol() {
@Override
public String getIdentifier() {
return "s3";
}
@Override
public Type getType() {
return Type.s3;
}
@Override
public boolean isEnabled() {
return false;
}
}, new TestProtocol() {
@Override
public String getIdentifier() {
return "davs";
}
@Override
public Type getType() {
return Type.dav;
}
@Override
public boolean isEnabled() {
return false;
}
})));
final ProfilePlistReader reader = new ProfilePlistReader(protocols);
final TestProtocol protocol = new TestProtocol() {
@Override
public String getIdentifier() {
return "davs";
}
@Override
public Scheme getScheme() {
return Scheme.https;
}
@Override
public Type getType() {
return Type.dav;
}
@Override
public boolean isEnabled() {
return false;
}
};
final Host host = new HostParser(protocols, protocol).get("https://svn.cyberduck.io/trunk/profiles");
final NullSession session = new NullSession(host);
session.open(Proxy.DIRECT, new DisabledHostKeyCallback(), new DisabledLoginCallback(), new DisabledCancelCallback());
final RemoteProfilesFinder finder = new RemoteProfilesFinder(session);
final Set<ProfileDescription> stream = finder.find();
assertTrue(stream.isEmpty());
session.close();
}
use of ch.cyberduck.core.DisabledHostKeyCallback in project cyberduck by iterate-ch.
the class AbstractS3DirectSDSTest method setup.
@Before
public void setup() throws Exception {
session = new SDSSession(new Host(new SDSProtocol(), "duck.dracoon.com", new Credentials(System.getProperties().getProperty("sds.user"), System.getProperties().getProperty("sds.key"))), new DisabledX509TrustManager(), new DefaultX509KeyManager());
session.enableMetrics();
final LoginConnectionService connect = new LoginConnectionService(new DisabledLoginCallback() {
@Override
public Credentials prompt(final Host bookmark, final String title, final String reason, final LoginOptions options) throws LoginCanceledException {
throw new LoginCanceledException();
}
}, new DisabledHostKeyCallback(), new DisabledPasswordStore(), new DisabledProgressListener());
connect.check(session, new DisabledCancelCallback());
}
use of ch.cyberduck.core.DisabledHostKeyCallback in project cyberduck by iterate-ch.
the class AbstractSDSTest method setup.
@Before
public void setup() throws Exception {
session = new SDSSession(new Host(new SDSProtocol(), "duck.dracoon.com", new Credentials(System.getProperties().getProperty("sds.user"), System.getProperties().getProperty("sds.key"))), new DisabledX509TrustManager(), new DefaultX509KeyManager());
session.enableMetrics();
final LoginConnectionService connect = new LoginConnectionService(new DisabledLoginCallback() {
@Override
public Credentials prompt(final Host bookmark, final String title, final String reason, final LoginOptions options) throws LoginCanceledException {
throw new LoginCanceledException();
}
}, new DisabledHostKeyCallback(), new DisabledPasswordStore(), new DisabledProgressListener());
connect.check(session, new DisabledCancelCallback());
}
Aggregations