-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
--database
and --port
to cb uri
command.
Adds the following flags to the `cb uri` command (#138): * `--database` - allows specifying and alternate database to connect to (default: postgres). * `--port` - allows specifying an alternate port to connect to (default: 5432). Example: ``` > cb uri <cluster_id> --database test --port 5431 postgres://postgres:<REDACTED>@p.<cluster_id>.db.postgresbridge.com:5431/test ```
- Loading branch information
1 parent
6f7b1e7
commit 8f14429
Showing
6 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,5 +42,23 @@ Spectator.describe CB::ClusterURI do | |
|
||
expect(&.output.to_s).to eq expected | ||
end | ||
|
||
it "output with different database and port" do | ||
action.cluster_id = cluster.id | ||
action.database = "test" | ||
action.port = 5431 | ||
action.role = "user" | ||
|
||
expect(client).to receive(:get_account).and_return(account) | ||
expect(client).to receive(:get_role).and_return(role) | ||
|
||
action.call | ||
|
||
expected = <<-EXPECTED | ||
postgres://u_mijrfkkuqvhernzfqcbqf7b6me:[email protected]:5431/test | ||
EXPECTED | ||
|
||
expect(&.output.to_s).to eq expected | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters