Skip to content

Commit

Permalink
Fix tables check in config_check (#93)
Browse files Browse the repository at this point in the history
* Perform config check in CI

* Add defaults to cli options

* Remove config check from start

* Ensure boostrap asserts in CI
  • Loading branch information
shayonj authored Jan 28, 2024
1 parent 1877e4c commit af0172d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/pg_easy_replicate/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class CLI < Thor
desc: "Copy schema to the new database"
method_option :tables,
aliases: "-t",
default: "",
desc:
"Comma separated list of table names. Default: All tables"
method_option :schema_name,
Expand Down Expand Up @@ -87,6 +88,7 @@ def cleanup
"Name of the schema tables are in, only required if passing list of tables"
method_option :tables,
aliases: "-t",
default: "",
desc:
"Comma separated list of table names. Default: All tables"
method_option :recreate_indices_post_copy,
Expand Down
2 changes: 1 addition & 1 deletion scripts/e2e-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export SOURCE_DB_URL="postgres://james-bond:james-bond123%407%21%273aaR@localhos
export TARGET_DB_URL="postgres://james-bond:james-bond123%407%21%273aaR@localhost:5433/postgres-db"
export PGPASSWORD='james-bond123@7!'"'"''"'"'3aaR'

# Bootstrap and cleanup
# Config check, Bootstrap and cleanup
echo "===== Performing Bootstrap and cleanup"
bundle exec bin/pg_easy_replicate bootstrap -g cluster-1 --copy-schema
bundle exec bin/pg_easy_replicate start_sync -g cluster-1 -s public --recreate-indices-post-copy
Expand Down
3 changes: 2 additions & 1 deletion spec/smoke_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
describe "dataset" do
it "matches after switchover" do
# Bootstrap
`./scripts/e2e-bootstrap.sh`
system("./scripts/e2e-bootstrap.sh")
expect($CHILD_STATUS.success?).to be(true)

r =
PgEasyReplicate::Query.run(
Expand Down

0 comments on commit af0172d

Please sign in to comment.