[scripts] import scripts from server-ce and add tests GitOrigin-RevId: 07e7e15aa86030ccd3eca40ed40e5492622dc2d1