To be upon one's good behavior

to be in a state of trial, in which something important depends on propriety of conduct.

See also: Behavior