diff --git a/java/com.sap.sailing.selenium.test/src/com/sap/sailing/selenium/api/test/SecurityApiTest.java b/java/com.sap.sailing.selenium.test/src/com/sap/sailing/selenium/api/test/SecurityApiTest.java index 2d95a8a1ffc..68a223bb9f3 100644 --- a/java/com.sap.sailing.selenium.test/src/com/sap/sailing/selenium/api/test/SecurityApiTest.java +++ b/java/com.sap.sailing.selenium.test/src/com/sap/sailing/selenium/api/test/SecurityApiTest.java @@ -16,7 +16,6 @@ import com.sap.sailing.selenium.api.event.SecurityApi.User; import com.sap.sailing.selenium.test.AbstractSeleniumTest; public class SecurityApiTest extends AbstractSeleniumTest { - private static final String USERNAME = "max"; private static final String USERNAME_FULL = "Max Mustermann"; @@ -30,12 +29,9 @@ public class SecurityApiTest extends AbstractSeleniumTest { @Test public void testCreateAndGetUser() { final ApiContext adminCtx = createAdminApiContext(getContextRoot(), SECURITY_CONTEXT); - final AccessToken createUserResponse = securityApi.createUser(adminCtx, "max", USERNAME_FULL, null, "start123"); - assertEquals("Responded username of createUser is different!", USERNAME, createUserResponse.getUsername()); assertNotNull("Token is missing in reponse!", createUserResponse.getAccessToken()); - User getUserResponse = securityApi.getUser(adminCtx, USERNAME); assertEquals("Responded username of getUser is different!", USERNAME, getUserResponse.getUsername()); } @@ -43,7 +39,6 @@ public class SecurityApiTest extends AbstractSeleniumTest { @Test public void testSayHello() { final ApiContext adminCtx = createAdminApiContext(getContextRoot(), SECURITY_CONTEXT); - final Hello hello = securityApi.sayHello(adminCtx); assertEquals("Responded principal of hello is different!", "admin", hello.getPrincipal()); assertEquals("Responded authenticated of hello is different!", true, hello.isAuthenticated()); diff --git a/java/com.sap.sse.landscape.aws.test/src/com/sap/sse/landscape/aws/ConnectivityTest.java b/java/com.sap.sse.landscape.aws.test/src/com/sap/sse/landscape/aws/ConnectivityTest.java index 2187600ceac..8c35ca090ba 100755 --- a/java/com.sap.sse.landscape.aws.test/src/com/sap/sse/landscape/aws/ConnectivityTest.java +++ b/java/com.sap.sse.landscape.aws.test/src/com/sap/sse/landscape/aws/ConnectivityTest.java @@ -140,7 +140,7 @@ public class ConnectivityTest { InetAddress address = host.getPublicAddress(Duration.ONE_SECOND.times(20)); assertNotNull(address); logger.info("Obtained public IP address "+address); - SshShellCommandChannel shellChannel = null; + SshCommandChannel shellChannel = null; int sshConnectAttempts = 20; while (shellChannel == null && sshConnectAttempts-- > 0) { try { diff --git a/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/AwsInstance.java b/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/AwsInstance.java index a639b541760..717b8e692b3 100755 --- a/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/AwsInstance.java +++ b/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/AwsInstance.java @@ -20,14 +20,14 @@ public interface AwsInstance extends Host { * commands to sent to the server, and a {@link PipedInputStream} wrapped around a {@link PipedOutputStream} which * you set to the channel. */ - SshShellCommandChannel createSshChannel(String sshUserName) throws JSchException, IOException, InterruptedException; + SshCommandChannel createSshChannel(String sshUserName) throws JSchException, IOException, InterruptedException; /** * Connects to an SSH session for the "root" user with a "shell" channel * * @see #createSshChannel(String) */ - SshShellCommandChannel createRootSshChannel() throws JSchException, IOException, InterruptedException; + SshCommandChannel createRootSshChannel() throws JSchException, IOException, InterruptedException; ChannelSftp createSftpChannel(String sshUserName) throws JSchException, IOException; diff --git a/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/SshShellCommandChannel.java b/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/SshCommandChannel.java similarity index 96% rename from java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/SshShellCommandChannel.java rename to java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/SshCommandChannel.java index eb4327e4924..a0bbe6625d3 100755 --- a/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/SshShellCommandChannel.java +++ b/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/SshCommandChannel.java @@ -11,7 +11,7 @@ import com.jcraft.jsch.JSchException; * @author Axel Uhl (D043530) * */ -public interface SshShellCommandChannel { +public interface SshCommandChannel { /** * @param commandLine * the command without any trailing line separator diff --git a/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/impl/AwsInstanceImpl.java b/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/impl/AwsInstanceImpl.java index d5efdf0daaf..28f1d27d7d6 100755 --- a/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/impl/AwsInstanceImpl.java +++ b/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/impl/AwsInstanceImpl.java @@ -24,7 +24,7 @@ import com.sap.sse.landscape.SecurityGroup; import com.sap.sse.landscape.aws.AwsAvailabilityZone; import com.sap.sse.landscape.aws.AwsInstance; import com.sap.sse.landscape.aws.AwsLandscape; -import com.sap.sse.landscape.aws.SshShellCommandChannel; +import com.sap.sse.landscape.aws.SshCommandChannel; import com.sap.sse.landscape.ssh.JCraftLogAdapter; import com.sap.sse.landscape.ssh.SSHKeyPair; import com.sap.sse.landscape.ssh.YesUserInfo; @@ -104,7 +104,7 @@ public class AwsInstanceImpl implements AwsInstance { * @see #createSshChannel(String) */ @Override - public SshShellCommandChannel createRootSshChannel() throws JSchException, IOException, InterruptedException { + public SshCommandChannel createRootSshChannel() throws JSchException, IOException, InterruptedException { return createSshChannel(ROOT_USER_NAME); } @@ -117,8 +117,8 @@ public class AwsInstanceImpl implements AwsInstance { * {@link PipedInputStream} wrapped around a {@link PipedOutputStream} which you set to the channel. */ @Override - public SshShellCommandChannel createSshChannel(String sshUserName) throws JSchException, IOException, InterruptedException { - return new SshShellCommandChannelImpl((ChannelExec) createSshChannelInternal(sshUserName, "exec")); + public SshCommandChannel createSshChannel(String sshUserName) throws JSchException, IOException, InterruptedException { + return new SshCommandChannelImpl((ChannelExec) createSshChannelInternal(sshUserName, "exec")); } private Channel createSshChannelInternal(String sshUserName, String channelType) throws JSchException, IOException { diff --git a/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/impl/SshShellCommandChannelImpl.java b/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/impl/SshCommandChannelImpl.java similarity index 85% rename from java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/impl/SshShellCommandChannelImpl.java rename to java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/impl/SshCommandChannelImpl.java index 6f67510118c..c3d0c302e3b 100755 --- a/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/impl/SshShellCommandChannelImpl.java +++ b/java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/impl/SshCommandChannelImpl.java @@ -10,11 +10,11 @@ import com.jcraft.jsch.Channel; import com.jcraft.jsch.ChannelExec; import com.jcraft.jsch.JSchException; import com.jcraft.jsch.Session; -import com.sap.sse.landscape.aws.SshShellCommandChannel; +import com.sap.sse.landscape.aws.SshCommandChannel; -public class SshShellCommandChannelImpl implements SshShellCommandChannel { - private static final Logger logger = Logger.getLogger(SshShellCommandChannelImpl.class.getName()); +public class SshCommandChannelImpl implements SshCommandChannel { + private static final Logger logger = Logger.getLogger(SshCommandChannelImpl.class.getName()); private final ChannelExec channel; private InputStream stdout; @@ -23,7 +23,7 @@ public class SshShellCommandChannelImpl implements SshShellCommandChannel { * the result of a {@link Session#openChannel(String)} call; the channel is assumed to not yet be * {@link Channel#connect() connected} */ - public SshShellCommandChannelImpl(ChannelExec channel) throws IOException, JSchException, InterruptedException { + public SshCommandChannelImpl(ChannelExec channel) throws IOException, JSchException, InterruptedException { this.channel = channel; }