|
469 | 469 |
|
470 | 470 | describe "JDBC connection URL" do |
471 | 471 | it "should use service name syntax by default" do |
472 | | - url = PLSQL::JDBCConnection.jdbc_connection_url(host: "myhost", port: 1521, database: "MYDB") |
473 | | - expect(url).to eq "jdbc:oracle:thin:@//myhost:1521/MYDB" |
| 472 | + url = PLSQL::JDBCConnection.jdbc_connection_url(host: "myhost", port: 1521, database: "MYSERVICENAME") |
| 473 | + expect(url).to eq "jdbc:oracle:thin:@//myhost:1521/MYSERVICENAME" |
474 | 474 | end |
475 | 475 |
|
476 | 476 | it "should use default host and port when not specified" do |
477 | | - url = PLSQL::JDBCConnection.jdbc_connection_url(database: "/MYDB") |
478 | | - expect(url).to eq "jdbc:oracle:thin:@//localhost:1521/MYDB" |
| 477 | + url = PLSQL::JDBCConnection.jdbc_connection_url(database: "/MYSERVICENAME") |
| 478 | + expect(url).to eq "jdbc:oracle:thin:@//localhost:1521/MYSERVICENAME" |
479 | 479 | end |
480 | 480 |
|
481 | 481 | it "should use SID syntax when database starts with colon" do |
|
484 | 484 | end |
485 | 485 |
|
486 | 486 | it "should use service name syntax when database starts with slash" do |
487 | | - url = PLSQL::JDBCConnection.jdbc_connection_url(host: "myhost", port: 1521, database: "/MYSERVICE") |
488 | | - expect(url).to eq "jdbc:oracle:thin:@//myhost:1521/MYSERVICE" |
| 487 | + url = PLSQL::JDBCConnection.jdbc_connection_url(host: "myhost", port: 1521, database: "/MYSERVICENAME") |
| 488 | + expect(url).to eq "jdbc:oracle:thin:@//myhost:1521/MYSERVICENAME" |
489 | 489 | end |
490 | 490 |
|
491 | 491 | it "should use TNS alias when TNS_ADMIN is set and no host specified" do |
|
496 | 496 | end |
497 | 497 |
|
498 | 498 | it "should use custom URL when provided" do |
499 | | - custom_url = "jdbc:oracle:thin:@//custom:1522/MYDB" |
500 | | - url = PLSQL::JDBCConnection.jdbc_connection_url(host: "myhost", database: "MYDB", url: custom_url) |
| 499 | + custom_url = "jdbc:oracle:thin:@//custom:1522/MYSERVICENAME" |
| 500 | + url = PLSQL::JDBCConnection.jdbc_connection_url(host: "myhost", database: "MYSERVICENAME", url: custom_url) |
501 | 501 | expect(url).to eq custom_url |
502 | 502 | end |
503 | 503 | end if defined?(JRuby) |
|
0 commit comments