Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 19ab904

Browse files
pontusmelkesherfert
andcommitted
Update cypher-shell/src/integration-test/java/org/neo4j/shell/MainIntegrationTest.java
Co-Authored-By: Satia Herfert <[email protected]>
1 parent f31f2fc commit 19ab904

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cypher-shell/src/integration-test/java/org/neo4j/shell/MainIntegrationTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,10 @@ public void promptsOnWrongAuthenticationIfInteractive() throws Exception {
8282
// should be connected
8383
assertTrue(shell.isConnected());
8484
// should have prompted and set the username and password
85+
assertEquals( format( "username: neo4j%npassword: ***%n" ), baos.toString() );
8586
assertEquals("neo4j", connectionConfig.username());
8687
assertEquals("neo", connectionConfig.password());
8788

88-
String out = baos.toString();
89-
assertEquals( format( "username: neo4j%npassword: ***%n" ), out );
9089
}
9190

9291
@Test
@@ -158,6 +157,7 @@ public void shouldAskForCredentialsWhenConnectingWithAFile() throws Exception {
158157
main.connectMaybeInteractively( shell, connectionConfig, true, true );
159158

160159
// then we should have prompted and set the username and password
160+
assertEquals( format( "username: neo4j%npassword: ***%n" ), baos.toString() );
161161
assertEquals("neo4j", connectionConfig.username());
162162
assertEquals("neo", connectionConfig.password());
163163
}
@@ -220,7 +220,6 @@ private String executeFileNonInteractively(String filename, Logger logger) throw
220220
ShellRunner shellRunner = ShellRunner.getShellRunner(cliArgs, shell, logger, connectionConfig);
221221
shellRunner.runUntilEnd();
222222

223-
// then
224223
return linePrinter.result();
225224
}
226225

0 commit comments

Comments
 (0)