Code review comment for ~powersj/cloud-init:cii-fix-kvm-tests

Revision history for this message
Joshua Powers (powersj) wrote :

>lets see if we can't just easily fix that.

I looked a little bit at this, particularly at the tests/cloud_tests/instances/base.py:run_script() function.

I think this is better tackled by removing our method of pushing a script and then executing that script and instead of going to your proposed method of specifying what is collected, specifically:

# These files should be collected when we from the running instance
# at the end of boot. Anything ending in a '/' should include
# be recursive.
files:
  - /run/cloud-init/
  - /var/lib/cloud/
  - /etc/passwd

# These are exectuted and the dictionary available to the test results.
collect_scripts:
  hosts: [cat, /etc/hosts]
  ps-a: [ps, -a]

At that point, we can handle the execution of by root then and there.

Thoughts? Is there an easy mechanism I have overlooked?

« Back to merge proposal