Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Feature/connect as sysdba #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Some simple tests to ensure parsing of special-chars User/PW is possible
  • Loading branch information
pesse committed Mar 14, 2019
commit 3af01221e1085e285d04cd522574720a47159db7
44 changes: 44 additions & 0 deletions 44 src/test/java/org/utplsql/cli/ConnectionConfigTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package org.utplsql.cli;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class ConnectionConfigTest {

@Test
void parse() {
ConnectionConfig info = new ConnectionConfig("test/pw@my.local.host/service");

assertEquals("test", info.getUser());
assertEquals("pw", info.getPassword());
assertEquals("my.local.host/service", info.getConnect());
}

@Test
void parseSysDba() {
ConnectionConfig info = new ConnectionConfig("sys as sysdba/pw@my.local.host/service");

assertEquals("sys as sysdba", info.getUser());
assertEquals("pw", info.getPassword());
assertEquals("my.local.host/service", info.getConnect());
}

@Test
void parseSpecialCharsPW() {
ConnectionConfig info = new ConnectionConfig("test/\"p@ssw0rd=\"@my.local.host/service");

assertEquals("test", info.getUser());
assertEquals("p@ssw0rd=", info.getPassword());
assertEquals("my.local.host/service", info.getConnect());
}

@Test
void parseSpecialCharsUser() {
ConnectionConfig info = new ConnectionConfig("\"User/Mine@=\"/pw@my.local.host/service");

assertEquals("User/Mine@=", info.getUser());
assertEquals("pw", info.getPassword());
assertEquals("my.local.host/service", info.getConnect());
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.