Merge lp:~canonical-platform-qa/snappy-ecosystem-tests/fix-snapcraft-staging into lp:snappy-ecosystem-tests

Proposed by Omer Akram
Status: Merged
Approved by: Omer Akram
Approved revision: 44
Merged at revision: 40
Proposed branch: lp:~canonical-platform-qa/snappy-ecosystem-tests/fix-snapcraft-staging
Merge into: lp:snappy-ecosystem-tests
Prerequisite: lp:~canonical-platform-qa/snappy-ecosystem-tests/dont-delete-ephemeral
Diff against target: 117 lines (+19/-16)
4 files modified
snappy_ecosystem_tests/environment/constants.py (+4/-4)
snappy_ecosystem_tests/environment/setup.py (+1/-2)
snappy_ecosystem_tests/helpers/snapcraft/client.py (+13/-8)
snappy_ecosystem_tests/helpers/store_apis/rest_apis.py (+1/-2)
To merge this branch: bzr merge lp:~canonical-platform-qa/snappy-ecosystem-tests/fix-snapcraft-staging
Reviewer Review Type Date Requested Status
platform-qa-bot continuous-integration Approve
Omer Akram (community) Approve
I Ahmad (community) Approve
Review via email: mp+319545@code.launchpad.net

Commit message

Fix snapcraft staging

Description of the change

Fix snapcraft staging, apparently we were pointing to production url

To post a comment you must log in.
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
I Ahmad (iahmad) wrote :

LGTM

review: Approve
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Omer Akram (om26er) wrote :

re-approving.

review: Approve
Revision history for this message
platform-qa-bot (platform-qa-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'snappy_ecosystem_tests/environment/constants.py'
2--- snappy_ecosystem_tests/environment/constants.py 2017-03-08 17:29:20 +0000
3+++ snappy_ecosystem_tests/environment/constants.py 2017-03-10 10:28:30 +0000
4@@ -50,13 +50,13 @@
5 "package_name": 'snapcraft',
6 "environment_variables": {
7 "UBUNTU_STORE_API_ROOT_URL":
8- "https://myapps.developer.ubuntu.com/dev/api/",
9+ "https://myapps.developer.staging.ubuntu.com/dev/api/",
10 "UBUNTU_STORE_UPLOAD_ROOT_URL":
11- "https://upload.apps.ubuntu.com",
12+ "https://upload.apps.staging.ubuntu.com/",
13 "UBUNTU_SSO_API_ROOT_URL":
14- "https://login.ubuntu.com/api/v2/",
15+ "https://login.staging.ubuntu.com/api/v2/",
16 "UBUNTU_STORE_SEARCH_ROOT_URL":
17- "https://search.apps.ubuntu.com/"
18+ "https://search.apps.staging.ubuntu.com/"
19 }
20 },
21 "snapweb": {
22
23=== modified file 'snappy_ecosystem_tests/environment/setup.py'
24--- snappy_ecosystem_tests/environment/setup.py 2017-03-09 08:13:37 +0000
25+++ snappy_ecosystem_tests/environment/setup.py 2017-03-10 10:28:30 +0000
26@@ -51,8 +51,7 @@
27 if __name__ == '__main__':
28 PARSER = argparse.ArgumentParser(description=
29 'Setup a snappy ecosystem environment.')
30- PARSER.add_argument('--mode', default="lxd",
31- help='lxd')
32+ PARSER.add_argument('--mode', default="lxd", help='lxd')
33 PARSER.add_argument('--profile', default="staging",
34 help='Profile to configure the environment')
35 ARGS = PARSER.parse_args()
36
37=== modified file 'snappy_ecosystem_tests/helpers/snapcraft/client.py'
38--- snappy_ecosystem_tests/helpers/snapcraft/client.py 2017-03-08 17:59:46 +0000
39+++ snappy_ecosystem_tests/helpers/snapcraft/client.py 2017-03-10 10:28:30 +0000
40@@ -24,16 +24,14 @@
41 import subprocess
42 import time
43
44+from snappy_ecosystem_tests.environment.constants import PROFILES, SNAPCRAFT
45 from snappy_ecosystem_tests.models.snap import Snap
46 from snappy_ecosystem_tests.utils.commands import build_command
47 from snappy_ecosystem_tests.utils.filters import filter_list
48 from snappy_ecosystem_tests.utils.ssh import SSHManager
49 from snappy_ecosystem_tests.utils.storeconfig import get_current_store
50-
51 from snappy_ecosystem_tests.commons.config import CONFIG_STACK
52-
53 from snappy_ecosystem_tests.utils import storeconfig
54-
55 # login credentials gotten from config file or shell environment
56 from snappy_ecosystem_tests.utils.user import (
57 get_snapcraft_remote_host_credentials
58@@ -64,7 +62,7 @@
59 SNAPCRAFT_CONFIG_FILE_PATH = '~/.config/snapcraft/snapcraft.cfg'
60
61
62-class Snapcraft(object):
63+class Snapcraft:
64 """Contain Snapcraft specific functionality to use via command
65 line interface"""
66 def __init__(self):
67@@ -90,7 +88,10 @@
68 command = build_snapcraft_command(command)
69 if debug:
70 command += ' -d'
71- return self.ssh.exec_command(command)
72+ return self.ssh.exec_command(
73+ command,
74+ environment=PROFILES[get_current_store()][SNAPCRAFT]
75+ ["environment_variables"])
76
77 def assert_logged_in(self):
78 """Assert that an user is logged.
79@@ -104,7 +105,9 @@
80 """Return bool representing if the user is logged into snapcraft."""
81 try:
82 output = self.ssh.exec_command(
83- 'cat %s' % SNAPCRAFT_CONFIG_FILE_PATH)
84+ 'cat %s' % SNAPCRAFT_CONFIG_FILE_PATH,
85+ environment=PROFILES[get_current_store()][SNAPCRAFT]
86+ ["environment_variables"])
87 return output is not ''
88 except ValueError:
89 return False
90@@ -126,9 +129,11 @@
91 :param email: the SSO email
92 :param password: the email password
93 """
94- self.ssh.exec_command((
95+ self.ssh.exec_command(
96 COMMANDS_LOGIN.format(email=email, password=password,
97- snapcraft=PATH_SNAPCRAFT)))
98+ snapcraft=PATH_SNAPCRAFT),
99+ environment=PROFILES[get_current_store()][SNAPCRAFT]
100+ ["environment_variables"])
101 return self.is_logged_in()
102
103 def list_registered(self, debug=True, raw=False):
104
105=== modified file 'snappy_ecosystem_tests/helpers/store_apis/rest_apis.py'
106--- snappy_ecosystem_tests/helpers/store_apis/rest_apis.py 2017-03-08 17:29:20 +0000
107+++ snappy_ecosystem_tests/helpers/store_apis/rest_apis.py 2017-03-10 10:28:30 +0000
108@@ -619,8 +619,7 @@
109 :param series: the snap's series to be registered
110 """
111 auth = _macaroon_auth(self.conf)
112- data = dict(snap_name=snap_name, is_private=private,
113- series=series)
114+ data = dict(snap_name=snap_name, is_private=private, series=series)
115 response = self.post(
116 'register-name/', data=json.dumps(data),
117 headers=dict({'Authorization': auth}, **JSON_CONTENT_TYPE))

Subscribers

People subscribed via source and target branches