← Back to team overview

cloud-init-dev team mailing list archive

Re: [Merge] ~powersj/cloud-init:cii-fix-kvm-tests into cloud-init:master

 


Diff comments:

> diff --git a/tests/cloud_tests/testcases/examples/writing_out_arbitrary_files.yaml b/tests/cloud_tests/testcases/examples/writing_out_arbitrary_files.yaml
> index 6f78f99..ccc34c2 100644
> --- a/tests/cloud_tests/testcases/examples/writing_out_arbitrary_files.yaml
> +++ b/tests/cloud_tests/testcases/examples/writing_out_arbitrary_files.yaml
> @@ -9,37 +9,36 @@ cloud_config: |
>    write_files:
>    -   encoding: b64
>        content: CiMgVGhpcyBmaWxlIGNvbnRyb2xzIHRoZSBzdGF0ZSBvZiBTRUxpbnV4
> -      owner: root:root
> -      path: /root/file_b64
> +      path: /tmp/file_b64

Let's try /var/tmp throughout. it allows for writing files that won't get clobbered and allows for writing files with exec perms.

>        permissions: '0644'
>    -   content: |
> -          # My new /root/file_text
> +          # My new /tmp/file_text
>  
>            SMBDOPTIONS="-D"
> -      path: /root/file_text
> +      path: /tmp/file_text
>    -   content: !!binary |
>            f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAwARAAAAAAABAAAAAAAAAAJAVAAAAAAAAAAAAAEAAOAAI
>            AEAAHgAdAAYAAAAFAAAAQAAAAAAAAABAAEAAAAAAAEAAQAAAAAAAwAEAAAAAAADAAQAAAAAAAAgA
>            AAAAAAAAAwAAAAQAAAAAAgAAAAAAAAACQAAAAAAAAAJAAAAAAAAcAAAAAAAAABwAAAAAAAAAAQAA
> -      path: /root/file_binary
> +      path: /tmp/file_binary
>        permissions: '0555'
>    -   encoding: gzip
>        content: !!binary |
>            H4sIAIDb/U8C/1NW1E/KzNMvzuBKTc7IV8hIzcnJVyjPL8pJ4QIA6N+MVxsAAAA=
> -      path: /root/file_gzip
> +      path: /tmp/file_gzip
>        permissions: '0755'
>  collect_scripts:
>    file_b64: |
>      #!/bin/bash
> -    file /root/file_b64
> +    file /tmp/file_b64
>    file_text: |
>      #!/bin/bash
> -    file /root/file_text
> +    file /tmp/file_text
>    file_binary: |
>      #!/bin/bash
> -    file /root/file_binary
> +    file /tmp/file_binary
>    file_gzip: |
>      #!/bin/bash
> -    file /root/file_gzip
> +    file /tmp/file_gzip
>  
>  # vi: ts=4 expandtab
> diff --git a/tests/cloud_tests/testcases/modules/keys_to_console.py b/tests/cloud_tests/testcases/modules/keys_to_console.py
> index 88b6812..07f3811 100644
> --- a/tests/cloud_tests/testcases/modules/keys_to_console.py
> +++ b/tests/cloud_tests/testcases/modules/keys_to_console.py
> @@ -10,13 +10,13 @@ class TestKeysToConsole(base.CloudTestCase):
>      def test_excluded_keys(self):
>          """Test excluded keys missing."""
>          out = self.get_data_file('syslog')
> -        self.assertNotIn('DSA', out)
> -        self.assertNotIn('ECDSA', out)
> +        self.assertNotIn('(DSA)', out)

Why are we tweaking these to be more specific, were they matching something incorrectly? Or are you just being more specific because   def test_syslog(self): was specific.

> +        self.assertNotIn('(ECDSA)', out)
>  
>      def test_expected_keys(self):
>          """Test expected keys exist."""
>          out = self.get_data_file('syslog')
> -        self.assertIn('ED25519', out)
> -        self.assertIn('RSA', out)
> +        self.assertIn('(ED25519)', out)
> +        self.assertIn('(RSA)', out)
>  
>  # vi: ts=4 expandtab


-- 
https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/331736
Your team cloud-init commiters is requested to review the proposed merge of ~powersj/cloud-init:cii-fix-kvm-tests into cloud-init:master.


References