Added test for environment update

please review it
thanks
Add `@BZ: 1176600`