#!/usr/bin/env bash

_add_server() {
  if [[ "$TEST_SERVER" == "default" ]]; then
      run $ABRA server add -l
  else
      run $ABRA server add "$TEST_SERVER"
  fi
  assert_success
  assert_exists "$ABRA_DIR/servers/$TEST_SERVER"
}

_rm_server() {
  if [[ "$TEST_SERVER" == "default" ]]; then
      run rm -rf "$ABRA_DIR/servers/default"
  else
      run $ABRA server remove --no-input "$TEST_SERVER"
  fi
  assert_success
  assert_not_exists "$ABRA_DIR/servers/$TEST_SERVER"
}

_rm_default_server(){
  run rm -rf "$ABRA_DIR/servers/default"
  assert_success
  assert_not_exists "$ABRA_DIR/servers/default"
}
