diff mbox series

[v1,05/11] tests/vm: fix basevm config

Message ID 20200323161514.23952-6-alex.bennee@linaro.org
State Superseded
Headers show
Series testing/next | expand

Commit Message

Alex Bennée March 23, 2020, 4:15 p.m. UTC
When the patch was merged it was part of a longer series which had
already merged the config changes. Semu-revert the config related
changes for now so things will build.

Fixes: b081986c85fd2
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 tests/vm/basevm.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

-- 
2.20.1

Comments

Philippe Mathieu-Daudé March 23, 2020, 4:32 p.m. UTC | #1
On 3/23/20 5:15 PM, Alex Bennée wrote:
> When the patch was merged it was part of a longer series which had

> already merged the config changes. Semu-revert the config related


Typo "semi-revert"?

> changes for now so things will build.

> 

> Fixes: b081986c85fd2

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>   tests/vm/basevm.py | 16 ++++++++--------

>   1 file changed, 8 insertions(+), 8 deletions(-)

> 

> diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py

> index cffe7c4600e..756ccf7acae 100644

> --- a/tests/vm/basevm.py

> +++ b/tests/vm/basevm.py

> @@ -358,23 +358,23 @@ class BaseVM(object):

>                             "local-hostname: {}-guest\n".format(name)])

>           mdata.close()

>           udata = open(os.path.join(cidir, "user-data"), "w")

> -        print("guest user:pw {}:{}".format(self._config['guest_user'],

> -                                           self._config['guest_pass']))

> +        print("guest user:pw {}:{}".format(self.GUEST_USER,

> +                                           self.GUEST_PASS))

>           udata.writelines(["#cloud-config\n",

>                             "chpasswd:\n",

>                             "  list: |\n",

> -                          "    root:%s\n" % self._config['root_pass'],

> -                          "    %s:%s\n" % (self._config['guest_user'],

> -                                           self._config['guest_pass']),

> +                          "    root:%s\n" % self.ROOT_PASS,

> +                          "    %s:%s\n" % (self.GUEST_USER,

> +                                           self.GUEST_PASS),

>                             "  expire: False\n",

>                             "users:\n",

> -                          "  - name: %s\n" % self._config['guest_user'],

> +                          "  - name: %s\n" % self.GUEST_USER,

>                             "    sudo: ALL=(ALL) NOPASSWD:ALL\n",

>                             "    ssh-authorized-keys:\n",

> -                          "    - %s\n" % self._config['ssh_pub_key'],

> +                          "    - %s\n" % SSH_PUB_KEY,

>                             "  - name: root\n",

>                             "    ssh-authorized-keys:\n",

> -                          "    - %s\n" % self._config['ssh_pub_key'],

> +                          "    - %s\n" % SSH_PUB_KEY,

>                             "locale: en_US.UTF-8\n"])

>           proxy = os.environ.get("http_proxy")

>           if not proxy is None:

> 


Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff mbox series

Patch

diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index cffe7c4600e..756ccf7acae 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -358,23 +358,23 @@  class BaseVM(object):
                           "local-hostname: {}-guest\n".format(name)])
         mdata.close()
         udata = open(os.path.join(cidir, "user-data"), "w")
-        print("guest user:pw {}:{}".format(self._config['guest_user'],
-                                           self._config['guest_pass']))
+        print("guest user:pw {}:{}".format(self.GUEST_USER,
+                                           self.GUEST_PASS))
         udata.writelines(["#cloud-config\n",
                           "chpasswd:\n",
                           "  list: |\n",
-                          "    root:%s\n" % self._config['root_pass'],
-                          "    %s:%s\n" % (self._config['guest_user'],
-                                           self._config['guest_pass']),
+                          "    root:%s\n" % self.ROOT_PASS,
+                          "    %s:%s\n" % (self.GUEST_USER,
+                                           self.GUEST_PASS),
                           "  expire: False\n",
                           "users:\n",
-                          "  - name: %s\n" % self._config['guest_user'],
+                          "  - name: %s\n" % self.GUEST_USER,
                           "    sudo: ALL=(ALL) NOPASSWD:ALL\n",
                           "    ssh-authorized-keys:\n",
-                          "    - %s\n" % self._config['ssh_pub_key'],
+                          "    - %s\n" % SSH_PUB_KEY,
                           "  - name: root\n",
                           "    ssh-authorized-keys:\n",
-                          "    - %s\n" % self._config['ssh_pub_key'],
+                          "    - %s\n" % SSH_PUB_KEY,
                           "locale: en_US.UTF-8\n"])
         proxy = os.environ.get("http_proxy")
         if not proxy is None: