Updated this branch to add new methods to Snapcraft and Snapd to dynamically switch the store they are interested in. This also allowed me to remove code that needed to whitelist variable exports over ssh.
So basically a test, self.snapd.switch_store('production') and it will point to production servers, similar snapcraft can do the toggle as well.
One open question: Do we still externally want to decide if a test should be run in production or staging through environment variable ? Or is it fine to give that responsibility to the test. OR do we want both ?
Our base test class could read from an environment variable if it should direct to staging or production for external control.
Updated this branch to add new methods to Snapcraft and Snapd to dynamically switch the store they are interested in. This also allowed me to remove code that needed to whitelist variable exports over ssh.
So basically a test, self.snapd. switch_ store(' production' ) and it will point to production servers, similar snapcraft can do the toggle as well.
One open question: Do we still externally want to decide if a test should be run in production or staging through environment variable ? Or is it fine to give that responsibility to the test. OR do we want both ?
Our base test class could read from an environment variable if it should direct to staging or production for external control.
Thoughts ?