(db_url, options, file_config, follower_ident)
| 79 | |
| 80 | |
| 81 | def setup_config(db_url, options, file_config, follower_ident): |
| 82 | # load the dialect, which should also have it set up its provision |
| 83 | # hooks |
| 84 | |
| 85 | dialect = sa_url.make_url(db_url).get_dialect() |
| 86 | |
| 87 | dialect.load_provisioning() |
| 88 | |
| 89 | if follower_ident: |
| 90 | db_url = follower_url_from_main(db_url, follower_ident) |
| 91 | db_opts = {} |
| 92 | update_db_opts(db_url, db_opts, options) |
| 93 | db_opts["scope"] = "global" |
| 94 | eng = engines.testing_engine(db_url, db_opts) |
| 95 | |
| 96 | post_configure_engine(db_url, eng, follower_ident) |
| 97 | |
| 98 | eng.connect().close() |
| 99 | |
| 100 | cfg = config.Config.register(eng, db_opts, options, file_config) |
| 101 | |
| 102 | # a symbolic name that tests can use if they need to disambiguate |
| 103 | # names across databases |
| 104 | if follower_ident: |
| 105 | config.ident = follower_ident |
| 106 | |
| 107 | if follower_ident: |
| 108 | configure_follower(cfg, follower_ident) |
| 109 | return cfg |
| 110 | |
| 111 | |
| 112 | def drop_follower_db(follower_ident): |
nothing calls this directly
no test coverage detected