Ex 17:2

17:2 quarreled. This translates the Hebrew word rib, which appears in the name “Meribah” (v. 7). Rib is often used in legal contexts with the meaning “to bring suit” (e.g., “plead your case,” Mic. 6:1). The move to stone Moses (v. 4) is the execution of judicial sentence for treason. The verdict is threatened if Moses does not provide water.

test the Lord. It is not Moses who is being put on trial, but God. Tempting, or testing, in this setting takes on a judicial meaning. God is being accused of abandoning Israel to die of thirst in the desert.