Example #1
0
def test_verify_container_ring_has_data(host):
    """Verify the swift account ring balance is less than 1.00."""

    ring = 'container'
    result = helpers.run_on_swift(rb_cmd_tmpl.format(ring), host)
    swift_data = helpers.parse_swift_ring_builder(result.stdout)

    assert swift_data
    assert swift_data['partitions'] > 0
Example #2
0
def test_verify_object_ring_balance(host):
    """Verify the swift account ring balance is less than 1.00."""

    ring = 'object'
    result = helpers.run_on_swift(rb_cmd_tmpl.format(ring), host)
    swift_data = helpers.parse_swift_ring_builder(result.stdout)

    assert swift_data
    assert swift_data['balance'] < 1
Example #3
0
def test_verify_account_ring_has_data(host):
    """Verify the swift account ring data partitions are greater than zero."""

    ring = 'account'
    result = helpers.run_on_swift(rb_cmd_tmpl.format(ring), host)
    swift_data = helpers.parse_swift_ring_builder(result.stdout)

    assert swift_data
    assert swift_data['partitions'] > 0
Example #4
0
def test_verify_object_ring_has_data(host):
    """Verify the swift object ring data partitions are greater than zero.

    Args:
        host (testinfra.host.Host): Testinfra host fixture.
    """

    ring = 'object'
    result = helpers.run_on_swift(rb_cmd_tmpl.format(ring), host)
    swift_data = helpers.parse_swift_ring_builder(result.stdout)

    assert swift_data
    assert swift_data['partitions'] > 0
Example #5
0
def test_verify_container_ring_balance(host):
    """Verify the swift container ring balance is less than 1.00.

    Args:
        host (testinfra.host.Host): Testinfra host fixture.
    """

    ring = 'container'
    result = helpers.run_on_swift(rb_cmd_tmpl.format(ring), host)
    swift_data = helpers.parse_swift_ring_builder(result.stdout)

    assert swift_data
    assert swift_data['balance'] < 1