     assert Redix.pipeline(c, [["PING"]]) == {:ok, ["PONG"]}
   end
 
-  test "some commands: APPEND", %{conn: c} do
-    assert Redix.command(c, ~w(APPEND to_append hello)) == {:ok, 5}
-    assert Redix.command(c, ~w(APPEND to_append world)) == {:ok, 10}
-  end
-
-  test "some commands: DBSIZE", %{conn: c} do
-    {:ok, i} = Redix.command(c, ["DBSIZE"])
-    assert is_integer(i)
-  end
-
-  test "some commands: INCR and DECR", %{conn: c} do
-    assert Redix.command(c, ["INCR", "to_incr"]) == {:ok, 1}
-    assert Redix.command(c, ["DECR", "to_incr"]) == {:ok, 0}
-  end
-
-  test "some commands: transactions with MULTI/EXEC (executing)", %{conn: c} do
-    assert Redix.command(c, ["MULTI"]) == {:ok, "OK"}
-
-    assert Redix.command(c, ["INCR", "multifoo"]) == {:ok, "QUEUED"}
-    assert Redix.command(c, ["INCR", "multibar"]) == {:ok, "QUEUED"}
-    assert Redix.command(c, ["INCRBY", "multifoo", 4]) == {:ok, "QUEUED"}
-
-    assert Redix.command(c, ["EXEC"]) == {:ok, [1, 1, 5]}
-  end
-
-  test "some commands: transactions with MULTI/DISCARD", %{conn: c} do
-    {:ok, "OK"} = Redix.command(c, ["SET", "discarding", "foo"])
-
-    assert Redix.command(c, ["MULTI"]) == {:ok, "OK"}
-    assert Redix.command(c, ["SET", "discarding", "bar"]) == {:ok, "QUEUED"}
-
-    # Discarding
-    assert Redix.command(c, ["DISCARD"]) == {:ok, "OK"}
-    assert Redix.command(c, ["GET", "discarding"]) == {:ok, "foo"}
-  end
-
-  test "some commands: MULTI/EXEC always returns a list", %{conn: c} do
-    assert Redix.command(c, ["MULTI"]) == {:ok, "OK"}
-    assert Redix.command(c, ["PING"]) == {:ok, "QUEUED"}
-    assert Redix.command(c, ["EXEC"]) == {:ok, ["PONG"]}
-  end
-
-  test "some commands: TYPE", %{conn: c} do
-    assert Redix.command(c, ["SET", "string_type", "foo bar"]) == {:ok, "OK"}
-    assert Redix.command(c, ["TYPE", "string_type"]) == {:ok, "string"}
-  end
-
-  test "some commands: STRLEN", %{conn: c} do
-    assert Redix.command(c, ["SET", "string_length", "foo bar"]) == {:ok, "OK"}
-    assert Redix.command(c, ["STRLEN", "string_length"]) == {:ok, 7}
-  end
-
-  test "some commands: LPUSH, LLEN, LPOP, LINDEX", %{conn: c} do
-    assert Redix.command(c, ~w(LPUSH mylist world)) == {:ok, 1}
-    assert Redix.command(c, ~w(LPUSH mylist hello)) == {:ok, 2}
-    assert Redix.command(c, ~w(LLEN mylist)) == {:ok, 2}
-    assert Redix.command(c, ~w(LINDEX mylist 0)) == {:ok, "hello"}
-    assert Redix.command(c, ~w(LPOP mylist)) == {:ok, "hello"}
-  end
-
-  test "Lua scripting: EVAL", %{conn: c} do
-    script = """
-    redis.call("SET", "evalling", "yes")
-    return {KEYS[1],ARGV[1],ARGV[2]}
-    """
-
-    cmds = ["eval", script, "1", "key", "first", "second"]
-
-    assert Redix.command(c, cmds) == {:ok, ["key", "first", "second"]}
-    assert Redix.command(c, ["GET", "evalling"]) == {:ok, "yes"}
-  end
-
-  test "Lua scripting: SCRIPT LOAD, SCRIPT EXISTS, EVALSHA", %{conn: c} do
-    script = """
-    return 'hello world'
-    """
-
-    {:ok, sha} = Redix.command(c, ["SCRIPT", "LOAD", script])
-    assert is_binary(sha)
-    assert Redix.command(c, ["SCRIPT", "EXISTS", sha, "foo"]) == {:ok, [1, 0]}
-
-    # Eval'ing the script
-    assert Redix.command(c, ["EVALSHA", sha, 0]) == {:ok, "hello world"}
-  end
-
-  test "command/2: Redis errors", %{conn: c} do
-    {:ok, _} = Redix.command(c, ~w(SET errs foo))
-    msg = "ERR value is not an integer or out of range"
-    assert Redix.command(c, ~w(INCR errs)) == {:error, %Error{message: msg}}
-  end
-
-  test "command/2: passing an empty list returns an error", %{conn: c} do
-    assert Redix.command(c, []) == {:error, :empty_command}
-  end
-
   test "pipeline/2: Redis errors in the response", %{conn: c} do
     msg = "ERR value is not an integer or out of range"
     assert {:ok, resp} = Redix.pipeline(c, [~w(SET pipeline_errs foo), ~w(INCR pipeline_errs)])

    assert Redix.pipeline(c, [["PING"], [], ["PING"]]) == {:error, :empty_command}
  end

  test "command!/2: simple commands", %{conn: c} do
    assert Redix.command!(c, ["PING"]) == "PONG"
    assert Redix.command!(c, ["SET", "bang", "foo"]) == "OK"

      {:ok, %{}}
    else
      {:ok, conn} = Redix.start_link()
      on_exit(fn -> Redix.stop(conn) end)
      {:ok, %{conn: conn}}
    end
  end

  @tag :no_setup
  test "start_link/2: specifying a database" do
    {:ok, c} = Redix.start_link(database: 1)
    assert Redix.command(c, ~w(SET my_key my_value)) == {:ok, "OK"}

    # Let's check we didn't write to the default database (which is 0).
    {:ok, c} = Redix.start_link
    assert Redix.command(c, ~w(GET my_key)) == {:ok, nil}
  end

  @tag :no_setup
  test "start_link/2: specifying a non existing database" do
    silence_log fn ->
      Process.flag :trap_exit, true
      {:ok, pid} = Redix.start_link(database: 1_000)

      error = %Error{message: "ERR invalid DB index"}
      assert_receive {:EXIT, ^pid, ^error}, 500
    end
  end

  @tag :no_setup
  test "start_link/2: specifying a password when no password is set" do
    silence_log fn ->
      Process.flag :trap_exit, true
      {:ok, pid} = Redix.start_link(password: "foo")

      error = %Error{message: "ERR Client sent AUTH, but no password is set"}
      assert_receive {:EXIT, ^pid, ^error}, 500
