<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/tests/cloud_tests/collect.py, branch 22.1</title>
<subtitle> (mirror of https://github.com/marekm72/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/marekm72/vyos-cloud-init.git/atom?h=22.1</id>
<link rel='self' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/atom?h=22.1'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/'/>
<updated>2021-09-29T23:32:53+00:00</updated>
<entry>
<title>testing: remove cloud_tests (#1020)</title>
<updated>2021-09-29T23:32:53+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-09-29T23:32:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=ba083245537abd5bf5942fbe851e21eb8f245000'/>
<id>urn:sha1:ba083245537abd5bf5942fbe851e21eb8f245000</id>
<content type='text'>
Cloud tests have been replaced with integration tests</content>
</entry>
<entry>
<title>tests: allow skipping an entire cloud_test without running.</title>
<updated>2018-10-01T18:23:34+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-10-01T18:23:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=40768bad4c7eb966b2a8c1308cdae22e578b2413'/>
<id>urn:sha1:40768bad4c7eb966b2a8c1308cdae22e578b2413</id>
<content type='text'>
Individual skipTest or setUp SkipTest will still launch the instance.
This allows us to stop the running of the instance so we don't
waste cycles or boot systems that are known to fail.

Also replace remaining unittest usage in tests/cloud_tests/
with unittest2.
</content>
</entry>
<entry>
<title>test: add optional --preserve-instance arg to integraiton tests</title>
<updated>2018-06-12T16:14:07+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2018-06-12T16:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=7b3c21615dac3b0d9163c9883309a2e7b675622a'/>
<id>urn:sha1:7b3c21615dac3b0d9163c9883309a2e7b675622a</id>
<content type='text'>
By default, integration tests destroy the test instances after each
test run. To aid debug and development of integration tests, support a
--preserve-instance argument which will leave the modified test instance
in a stopped state for further debug.
</content>
</entry>
<entry>
<title>tests: restructure SSH and initial connections</title>
<updated>2018-05-16T14:16:10+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2018-05-16T14:16:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=589b542bfb3b6630b931a506ca017635059cef1d'/>
<id>urn:sha1:589b542bfb3b6630b931a506ca017635059cef1d</id>
<content type='text'>
The SSH function was retrying and waiting for SSH for over an
hour when an SSH connection was failing to be established. This
reduces the amount of retries and time between each retry to
prevent tests from running for hours.

Also restructures how waiting for the system works: the system
will attempt to SSH up to the boot timeout time by catching
SSH connection failures and retrying until the timeout is
reached. If the limit is reached now an exception is thrown
to abort the test.

Drive by - this also fixes printing of the instance name when
collecting the console log, rather than showing a Python object
address.

Fixes LP: #1758409
</content>
</entry>
<entry>
<title>pylint: pay attention to unused variable warnings.</title>
<updated>2018-04-20T03:30:08+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-04-20T03:30:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=1081962eacf2814fea6f4fa3255c530de14e4a24'/>
<id>urn:sha1:1081962eacf2814fea6f4fa3255c530de14e4a24</id>
<content type='text'>
This enables warnings produced by pylint for unused variables (W0612),
and fixes the existing errors.
</content>
</entry>
<entry>
<title>tests: add support for logs with lxd from snap and future lxd 3.</title>
<updated>2018-02-12T15:53:49+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-01-26T21:00:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=f576b2a24b8014e91087933d19a7a0d396787c30'/>
<id>urn:sha1:f576b2a24b8014e91087933d19a7a0d396787c30</id>
<content type='text'>
This puts in place detection for if 'show-log' will work with lxc
client, and uses that if present. The 'lxc console --show-log' is
not expected to work until lxd/liblxc3.0. That should come in a
few months. The hope is that when that function arrives, this
code will move over to using it.

For other scenarios (all current lxd installs) this will now
support getting logs from a snap installed lxd or a package installed
lxd via the old 'lxc.console.logfile'.

If installed from snap, a platform error will be raised until
the user does:
   sudo mkdir --mode=1777 -p /var/snap/lxd/common/consoles

LP: #1745663
</content>
</entry>
<entry>
<title>tests: Collect script output as binary, collect systemd journal, fix lxd.</title>
<updated>2018-01-25T19:26:34+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-01-25T19:26:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=bc84f5023f795c261e32cf0690b2d29e12cfaedd'/>
<id>urn:sha1:bc84f5023f795c261e32cf0690b2d29e12cfaedd</id>
<content type='text'>
This adds collection a gzip compressed systemd journal on systemd systems.
The file can later be reviewed with:
  zcat system.journal.gz &gt; system.journal
  journalctl --file=system.journal [-o short-monotonic ..]

To support this:
  * modify test harness infrastructure to not assume content is utf-8.
  * fix lxd platform to support make '_execute' return bytes rather
    than a string. https://github.com/lxc/pylxd/issues/268

Also switched the base collectors to use /bin/sh as others already did.
</content>
</entry>
<entry>
<title>tests: Enable AWS EC2 Integration Testing</title>
<updated>2018-01-06T01:30:33+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2017-12-07T20:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=34595e9b4abacc10ac599aad97c95861af34ea54'/>
<id>urn:sha1:34595e9b4abacc10ac599aad97c95861af34ea54</id>
<content type='text'>
This enables integration tests to utilize AWS EC2 as a testing platform by
utilizing the boto3 Python library.

Usage will create and delete a custom VPC for every run. All resources
will be tagged with the ec2 tag, 'cii', and the date (e.g.
cii-20171220-102452).  The VPC is setup with both IPv4 and IPv6
capabilities, but will only hand out IPv4 addresses by default. Instances
will have complete Internet access and have full ingress and egress access
(i.e. no firewall).

SSH keys are generated with each run of the integration tests with the key
getting uploaded to AWS at the start of tests and deleted on exit.  To
enable creation when the platform is setup the SSH generation code is
moved to be completed by the platform setup and not during image setup.
The nocloud-kvm platform was updated with this change.

Creating a custom image will utilize the same clean script,
boot_clean_script, that the LXD platform uses as well. The custom AMI is
generated, used, and de-registered after a test run.

The default instance type is set to t2.micro. This is one of the smallest
instance types and is free tier eligible.

The default timeout for ec2 was increased to 300 from 120 as many tests
hit up against the 2 minute timeout and depending on region load can
go over.

Documentation for the AWS platform was added with the expected
configuration files for the platform to be used. There are some
additional whitespace changes included as well.

pylint exception was added for paramiko and simplestreams. In the past
these were not already flagged due to no __init__.py in the subdirectories
of files that used these. boto3 was added to the list of dependencies in
the tox ci-test runner.

In order to grab console logs on EC2 the harness will now shut down an
instance before terminating and before collecting the console log.  This
is to address a behavior of EC2 where the console log is refreshed very
infrequently, but one point when it is refreshed is after shutdown.
</content>
</entry>
<entry>
<title>tests: fix collect_console when not implemented</title>
<updated>2017-12-12T18:28:05+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2017-12-12T18:28:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=b63ee73da874de68ff2019570e12df2a39d4626b'/>
<id>urn:sha1:b63ee73da874de68ff2019570e12df2a39d4626b</id>
<content type='text'>
The exception was incorrectly creating a string and not a bytes object.
</content>
</entry>
<entry>
<title>pylint: Update pylint to 1.7.1, run on tests/ and tools and fix complaints.</title>
<updated>2017-12-08T03:40:07+00:00</updated>
<author>
<name>Ryan Harper</name>
<email>ryan.harper@canonical.com</email>
</author>
<published>2017-12-06T22:30:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=a110e483e8644ab73e69853ea11b6c4c6cfa04b6'/>
<id>urn:sha1:a110e483e8644ab73e69853ea11b6c4c6cfa04b6</id>
<content type='text'>
The motivation for this is that
 a.) 1.7.1 runs with python 3.6 (bionic)
 b.) we want to run pylint on tests/ and tools for the same reasons
     that we want to run it on cloudinit/

The changes are described below.
- Update tox.ini to invoke pylint v1.7.1.
- Modify .pylintrc generated-members ignore mocked object members (m_.*)
- Replace "dangerous" params defaulting to {}
- Fix up cloud_tests use of platforms
- Cast some instance objects to with dict()
- Handle python2.7 vs 3+ ConfigParser use of readfp (deprecated)
- Update use of assertEqual(&lt;boolean&gt;, value) to assert&lt;Boolean&gt;(value)
- replace depricated assertRegexp -&gt; assertRegex
- Remove useless test-class calls to super class
- Assign class property accessors a result and use it
- Fix missing class member in CepkoResultTests
- Fix Cheetah test import
</content>
</entry>
</feed>
