Add one regression test on api_key management