Skip to content

Commit

Permalink
Remove the shell server and the remaining pieces of neo4j-shell.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvest committed Oct 2, 2018
1 parent 0b50b3a commit 6f83bc5
Show file tree
Hide file tree
Showing 176 changed files with 13 additions and 23,551 deletions.

This file was deleted.

Expand Up @@ -26,7 +26,6 @@
import org.neo4j.kernel.impl.query.clientconnection.BoltConnectionInfo;
import org.neo4j.kernel.impl.query.clientconnection.ClientConnectionInfo;
import org.neo4j.kernel.impl.query.clientconnection.HttpConnectionInfo;
import org.neo4j.kernel.impl.query.clientconnection.ShellConnectionInfo;

import static org.junit.Assert.assertEquals;

Expand Down Expand Up @@ -80,17 +79,4 @@ public void connectionDetailsForEmbeddedQuerySource()
// then
assertEquals( "embedded-session\t", connectionDetails );
}

@Test
public void connectionDetailsForShellSession()
{
// given
ClientConnectionInfo clientConnection = new ShellConnectionInfo( 1 ).withUsername( "FULL" );

// when
String connectionDetails = clientConnection.asConnectionDetails();

// then
assertEquals( "shell-session\tshell\t1\tFULL", connectionDetails );
}
}
1 change: 0 additions & 1 deletion community/neo4j-harness/LICENSES.txt
Expand Up @@ -301,7 +301,6 @@ BSD License
asm-analysis
asm-tree
asm-util
JLine
Scala Compiler
------------------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion community/neo4j-harness/NOTICE.txt
Expand Up @@ -77,7 +77,6 @@ BSD License
asm-analysis
asm-tree
asm-util
JLine
Scala Compiler

Bouncy Castle License
Expand Down
1 change: 0 additions & 1 deletion community/pom.xml
Expand Up @@ -68,7 +68,6 @@
<module>graph-algo</module>
<module>neo4j</module>
<module>neo4j-community</module>
<module>shell</module>
<module>import-tool</module>
<module>server-api</module>
<module>bolt</module>
Expand Down
1 change: 0 additions & 1 deletion community/server-plugin-test/LICENSES.txt
Expand Up @@ -298,7 +298,6 @@ BSD License
asm-analysis
asm-tree
asm-util
JLine
Scala Compiler
------------------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion community/server-plugin-test/NOTICE.txt
Expand Up @@ -74,7 +74,6 @@ BSD License
asm-analysis
asm-tree
asm-util
JLine
Scala Compiler

Bouncy Castle License
Expand Down
1 change: 0 additions & 1 deletion community/server/LICENSES.txt
Expand Up @@ -298,7 +298,6 @@ BSD License
asm-analysis
asm-tree
asm-util
JLine
Scala Compiler
------------------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion community/server/NOTICE.txt
Expand Up @@ -74,7 +74,6 @@ BSD License
asm-analysis
asm-tree
asm-util
JLine
Scala Compiler

Bouncy Castle License
Expand Down
6 changes: 0 additions & 6 deletions community/server/pom.xml
Expand Up @@ -155,12 +155,6 @@
<version>${neo4j-browser.version}</version>
</dependency>

<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-shell</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
Expand Down

This file was deleted.

This file was deleted.

@@ -1,2 +1 @@
org.neo4j.server.rest.management.console.ShellSessionCreator
org.neo4j.server.rest.management.console.CypherSessionCreator
Expand Up @@ -27,19 +27,13 @@
import javax.management.ObjectName;

import org.neo4j.jmx.impl.ConfigurationBean;
import org.neo4j.kernel.configuration.Settings;
import org.neo4j.ports.allocation.PortAuthority;
import org.neo4j.server.CommunityNeoServer;
import org.neo4j.server.configuration.ServerSettings;
import org.neo4j.server.helpers.CommunityServerBuilder;
import org.neo4j.shell.ShellLobby;
import org.neo4j.shell.ShellSettings;
import org.neo4j.test.server.ExclusiveServerTestBase;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.fail;
import static org.neo4j.graphdb.factory.GraphDatabaseSettings.transaction_timeout;
import static org.neo4j.jmx.JmxUtils.getAttribute;
import static org.neo4j.jmx.JmxUtils.getObjectName;
Expand Down Expand Up @@ -85,49 +79,6 @@ public void serverConfigShouldBeVisibleInJMX() throws Throwable
assertThat( attr, equalTo( configValue ) );
}

@Test
public void shouldBeAbleToOverrideShellConfig() throws Throwable
{
// Given
final int customPort = PortAuthority.allocatePort();

server = CommunityServerBuilder.serverOnRandomPorts()
.withProperty( ShellSettings.remote_shell_enabled.name(), Settings.TRUE )
.withProperty( ShellSettings.remote_shell_port.name(), "" + customPort )
.build();

// When
this.server.start();

// Then
// Try to connect with a shell client to that custom port.
// Throws exception if unable to connect
ShellLobby.newClient( customPort )
.shutdown();
}

@Test
public void shouldNotBeAbleToConnectWithShellOnDefaultPortWhenNoShellConfigSupplied() throws Throwable
{
// Given
server = CommunityServerBuilder.serverOnRandomPorts().build();

// When
server.start();

// Then
try
{
ShellLobby.newClient().shutdown();
fail( "Should not have been able to connect a shell client" );
}
catch ( Exception e )
{
assertThat( "Should have been got connection refused", e.getMessage(),
containsString( "Connection refused" ) );
}
}

@After
public void cleanup()
{
Expand Down

0 comments on commit 6f83bc5

Please sign in to comment.