コード例 #1
0
def given_db_operator_is_installed(context):
    db_operator = DbOperator()
    if not db_operator.is_running():
        print("DB operator is not installed, installing...")
        db_operator.install_catalog_source() | should.be_truthy.desc("DB catalog source installed")
        db_operator.install_operator_subscription() | should.be_truthy.desc("DB operator subscription installed")
        db_operator.is_running(wait=True) | should.be_truthy.desc("DB operator installed")
    print("PostgresSQL DB operator is running!!!")
コード例 #2
0
def given_db_operator_is_installed(context):
    db_operator = DbOperator()
    if not db_operator.is_running():
        print("DB operator is not installed, installing...")
        assert db_operator.install_catalog_source(), "Unable to install DB catalog source"
        assert db_operator.install_operator_subscription(), "Unable to install DB operator subscription"
        assert db_operator.is_running(wait=True), "Unable to launch DB operator"
    print("PostgresSQL DB operator is running!!!")