how does swap environmental URL work exactly?
===

I recently used swap environmental URL to upgrade my Elastic Beanstalk application, using two environments. I have a CNAME record at a different URL mapped to the beanstalk URL. I tried then to push to the production environment(which now was at the test URL), and then swapped again, but this seemed to not work correctly.

I would expect the swap to map the test environment to the production URL, meaning that when I was previously pushing to the test environment to test, now I should push to the production environment, then swap to make another zero-downtime upgrade. This can be very confusing, so I was hoping someone can shed light on this, as there seems to be adearth of information about Elastic Beanstalk and swapping URLs.