Merge lp://qastaging/~bjornt/landscape-charm/tests-real-package into lp://qastaging/~landscape/landscape-charm/trunk

Proposed by Björn Tillenius
Status: Merged
Approved by: Björn Tillenius
Approved revision: 302
Merged at revision: 291
Proposed branch: lp://qastaging/~bjornt/landscape-charm/tests-real-package
Merge into: lp://qastaging/~landscape/landscape-charm/trunk
Diff against target: 303 lines (+103/-20)
9 files modified
dev/ubuntu-deps (+2/-1)
lib/apt.py (+4/-3)
lib/callbacks/tests/test_scripts.py (+3/-0)
lib/tests/stubs.py (+50/-1)
lib/tests/test_apt.py (+34/-15)
lib/tests/test_migrate_schema.py (+1/-0)
lib/tests/test_pause.py (+3/-0)
lib/tests/test_resume.py (+3/-0)
lib/tests/test_services.py (+3/-0)
To merge this branch: bzr merge lp://qastaging/~bjornt/landscape-charm/tests-real-package
Reviewer Review Type Date Requested Status
🤖 Landscape Builder test results Approve
Fernando Correa Neto (community) Approve
Free Ekanayaka (community) Approve
Review via email: mp+260133@code.qastaging.launchpad.net

Commit message

Change the package building tests to use real subprocess calls as much
as possible.

Using real calls is slower, but it give more confidence that things
work, as opposed to checking that a long list of commands were issued.
For example, this revealed a bug where the source tarball got
overwritten in some cases.

Description of the change

Change the package building tests to use real subprocess calls as much
as possible.

Using real calls is slower, but it give more confidence that things
work, as opposed to checking that a long list of commands were issued.
For example, this revealed a bug where the source tarball got
overwritten in some cases.

The main driver for this change is to make SubprocessStub being able to
be a bit more real and provide functionality for providing custom output
and fail scenarios. I made it so that you have to explicitly say which
executables that should be fake, since we should use that functionality
as little as possible.

Subprocess.check_output() isn't used in this branch, but will be used in
the next branch. I added it here to show how final results in one place.

To post a comment you must log in.
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :
Download full text (18.2 KiB)

Command: make ci-test
Result: Fail
Revno: 296
Branch: lp:~bjornt/landscape-charm/tests-real-package
Jenkins: https://ci.lscape.net/job/latch-test/1013/
-------------------------------------------
./dev/ubuntu-deps
Reading package lists...
Building dependency tree...
Reading state information...
software-properties-common is already the newest version.
The following package was automatically installed and is no longer required:
  os-prober
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
gpg: keyring `/tmp/tmpr5a4rx33/secring.gpg' created
gpg: keyring `/tmp/tmpr5a4rx33/pubring.gpg' created
gpg: requesting key C8068B11 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpr5a4rx33/trustdb.gpg: trustdb created
gpg: key C8068B11: public key "Launchpad Ensemble PPA" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
Ign http://archive.ubuntu.com trusty InRelease
Ign http://security.ubuntu.com trusty-security InRelease
Ign http://archive.ubuntu.com trusty-updates InRelease
Ign http://ppa.launchpad.net trusty InRelease
Ign http://ppa.launchpad.net trusty InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Hit http://archive.ubuntu.com trusty Release.gpg
Hit http://ppa.launchpad.net trusty Release.gpg
Get:2 http://archive.ubuntu.com trusty-updates Release.gpg [933 B]
Get:3 http://security.ubuntu.com trusty-security Release [63.5 kB]
Hit http://ppa.launchpad.net trusty Release.gpg
Hit http://archive.ubuntu.com trusty Release
Hit http://ppa.launchpad.net trusty Release
Hit http://ppa.launchpad.net trusty Release
Get:4 http://archive.ubuntu.com trusty-updates Release [63.5 kB]
Ign https://private-ppa.launchpad.net trusty InRelease
Ign https://private-ppa.launchpad.net trusty InRelease
Hit https://private-ppa.launchpad.net trusty Release.gpg
Hit https://private-ppa.launchpad.net trusty Release
Hit http://archive.ubuntu.com trusty/main Sources
Hit http://archive.ubuntu.com trusty/universe Sources
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/universe Translation-en
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Get:5 http://security.ubuntu.com trusty-security/main Sources [81.4 kB]
Get:6 http://security.ubuntu.com trusty-security/universe Sources [25.2 kB]
Get:7 http://security.ubuntu.com trusty-security/main amd64 Packages [272 kB]
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Get:8 http://security.ubuntu.com trusty-security/universe amd64 Packages [104 kB]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Get:9 http://archive.ubuntu.com trusty-updates/main Sources [205 kB]
Get:10 http://archive.ubuntu.com trusty-updates/universe Sources [117 kB]
Get:11 http://archive.ubuntu.com trusty-updates/main amd64 Packag...

review: Needs Fixing (test results)
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

+1

[0]

lib/tests/test_apt.py:6: 'apt_pkg' imported but unused
lib/tests/test_apt.py:8: 'BUILD_LOCAL_ARCHIVE' imported but unused

review: Approve
Revision history for this message
Fernando Correa Neto (fcorrea) wrote :

Looks good. +1

review: Approve
Revision history for this message
Björn Tillenius (bjornt) wrote :

The lint issues had already been fixed. I address the inline comment as well.

Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :

Command: make ci-test
Result: Success
Revno: 298
Branch: lp:~bjornt/landscape-charm/tests-real-package
Jenkins: https://ci.lscape.net/job/latch-test/1019/

review: Approve (test results)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :
Download full text (20.6 KiB)

The attempt to merge lp:~bjornt/landscape-charm/tests-real-package into lp:landscape-charm failed. Below is the output from the failed tests.

./dev/ubuntu-deps
Reading package lists...
Building dependency tree...
Reading state information...
python-software-properties is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-3.2.0-80 linux-headers-3.2.0-76-virtual linux-headers-3.2.0-76
  linux-headers-3.2.0-82 linux-headers-3.2.0-79 linux-headers-3.2.0-79-virtual
  linux-image-3.2.0-82-virtual linux-headers-3.2.0-82-virtual
  linux-headers-3.2.0-80-virtual
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
OK
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools Release.gpg
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools Release
Hit http://ppa.launchpad.net precise Release
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main amd64 Packages
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main i386 Packages
Hit http://ppa.launchpad.net precise/main amd64 Packages
Ign http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main TranslationIndex
Hit http://ppa.launchpad.net precise/main i386 Packages
Hit http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Translation-en
Ign http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main Translation-en_US
Ign http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main Translation-en
Hit http://security.ubuntu.com precise-security Release.gpg
Hit http://mirrors.digitalocean.com precise Release.gpg
Hit http://mirrors.digitalocean.com precise-updates Release.gpg
Hit https://private-ppa.launchpad.net precise Release.gpg
Hit http://security.ubuntu.com precise-security Release
Hit https://private-ppa.launchpad.net precise Release.gpg
Hit https://private-ppa.launchpad.net precise Release
Hit https://private-ppa.launchpad.net precise Release
Hit https://private-ppa.launchpad.net precise/main amd64 Packages
Hit https://private-ppa.launchpad.net precise/main i386 Packages
Hit https://private-ppa.launchpad.net precise/main TranslationIndex
Hit https://private-ppa.launchpad.net precise/main amd64 Packages
Hit https://private-ppa.launchpad.net precise/main i386 Packages
Hit https://private-ppa.launchpad.net precise/main TranslationIndex
Hit https://private-ppa.launchpad.net precise/main Translation-en
Hit http://security.ubuntu.com precise-security/main Sources
Hit https://private-ppa.launchpad.net precise/main Translation-en
Hit http://security.ubuntu.com precise-security/universe Sources
Hit http://security.ubuntu.com precise-security/main amd64 Packages
Hit http://mirrors.digitalocean.com precise Release
Hit http://mirrors.digitalocean.com precise-updates Release
Hit http://security.ubuntu.com precise-security/universe amd64 Packages
Hit http://security.ubuntu.com precise-security/main i386 Packages
Hit http:...

Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :
Download full text (17.8 KiB)

The attempt to merge lp:~bjornt/landscape-charm/tests-real-package into lp:landscape-charm failed. Below is the output from the failed tests.

./dev/ubuntu-deps
Reading package lists...
Building dependency tree...
Reading state information...
python-software-properties is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-3.2.0-80 linux-headers-3.2.0-76-virtual linux-headers-3.2.0-76
  linux-headers-3.2.0-82 linux-headers-3.2.0-79 linux-headers-3.2.0-79-virtual
  linux-image-3.2.0-82-virtual linux-headers-3.2.0-82-virtual
  linux-headers-3.2.0-80-virtual
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
OK
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools Release.gpg
Hit http://security.ubuntu.com precise-security Release.gpg
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools Release
Hit http://security.ubuntu.com precise-security Release
Hit http://ppa.launchpad.net precise Release
Hit http://mirrors.digitalocean.com precise Release.gpg
Hit http://mirrors.digitalocean.com precise-updates Release.gpg
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main amd64 Packages
Hit http://security.ubuntu.com precise-security/main Sources
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main i386 Packages
Hit http://security.ubuntu.com precise-security/universe Sources
Ign http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Sources
Hit http://security.ubuntu.com precise-security/main amd64 Packages
Hit http://ppa.launchpad.net precise/main amd64 Packages
Hit http://security.ubuntu.com precise-security/universe amd64 Packages
Hit http://ppa.launchpad.net precise/main i386 Packages
Hit http://security.ubuntu.com precise-security/main i386 Packages
Hit http://ppa.launchpad.net precise/main TranslationIndex
Hit http://security.ubuntu.com precise-security/universe i386 Packages
Hit http://ppa.launchpad.net precise/main Translation-en
Hit http://security.ubuntu.com precise-security/main TranslationIndex
Hit http://security.ubuntu.com precise-security/universe TranslationIndex
Hit http://security.ubuntu.com precise-security/main Translation-en
Hit http://security.ubuntu.com precise-security/universe Translation-en
Ign http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main Translation-en_US
Ign http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main Translation-en
Hit https://private-ppa.launchpad.net precise Release.gpg
Hit https://private-ppa.launchpad.net precise Release.gpg
Hit https://private-ppa.launchpad.net precise Release
Hit https://private-ppa.launchpad.net precise Release
Hit https://private-ppa.launchpad.net precise/main amd64 Packages
Hit https://private-ppa.launchpad.net precise/main i386 Packages
Hit https://private-ppa.launchpad.net precise/main TranslationIndex
Hit https://private-ppa.launchpad.net precise/main amd64 Packages
Hit https://private-ppa.launchp...

Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :

Command: make ci-test
Result: Success
Revno: 300
Branch: lp:~bjornt/landscape-charm/tests-real-package
Jenkins: https://ci.lscape.net/job/latch-test/1026/

review: Approve (test results)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :
Download full text (17.8 KiB)

The attempt to merge lp:~bjornt/landscape-charm/tests-real-package into lp:landscape-charm failed. Below is the output from the failed tests.

./dev/ubuntu-deps
Reading package lists...
Building dependency tree...
Reading state information...
python-software-properties is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-3.2.0-80 linux-headers-3.2.0-76-virtual linux-headers-3.2.0-76
  linux-headers-3.2.0-82 linux-headers-3.2.0-79 linux-headers-3.2.0-79-virtual
  linux-image-3.2.0-82-virtual linux-headers-3.2.0-82-virtual
  linux-headers-3.2.0-80-virtual
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
OK
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ppa.launchpad.net precise Release
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools Release.gpg
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools Release
Hit http://ppa.launchpad.net precise/main amd64 Packages
Hit http://ppa.launchpad.net precise/main i386 Packages
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main amd64 Packages
Hit http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Translation-en
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main i386 Packages
Ign http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main TranslationIndex
Hit https://private-ppa.launchpad.net precise Release.gpg
Hit https://private-ppa.launchpad.net precise Release.gpg
Hit https://private-ppa.launchpad.net precise Release
Hit https://private-ppa.launchpad.net precise Release
Hit http://security.ubuntu.com precise-security Release.gpg
Hit https://private-ppa.launchpad.net precise/main amd64 Packages
Ign http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main Translation-en_US
Hit https://private-ppa.launchpad.net precise/main i386 Packages
Hit https://private-ppa.launchpad.net precise/main TranslationIndex
Ign http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main Translation-en
Hit https://private-ppa.launchpad.net precise/main amd64 Packages
Hit https://private-ppa.launchpad.net precise/main i386 Packages
Hit https://private-ppa.launchpad.net precise/main TranslationIndex
Hit https://private-ppa.launchpad.net precise/main Translation-en
Hit https://private-ppa.launchpad.net precise/main Translation-en
Hit http://security.ubuntu.com precise-security Release
Hit http://security.ubuntu.com precise-security/main Sources
Hit http://security.ubuntu.com precise-security/universe Sources
Hit http://security.ubuntu.com precise-security/main amd64 Packages
Hit http://mirrors.digitalocean.com precise Release.gpg
Hit http://mirrors.digitalocean.com precise-updates Release.gpg
Hit http://security.ubuntu.com precise-security/universe amd64 Packages
Hit http://security.ubuntu.com precise-security/main i386 Packages
Hit http://security.ubuntu.com precise-security/universe i386 Packages
Hit http://security.ubuntu.com precise-security/ma...

Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :

Command: make ci-test
Result: Success
Revno: 301
Branch: lp:~bjornt/landscape-charm/tests-real-package
Jenkins: https://ci.lscape.net/job/latch-test/1034/

review: Approve (test results)
302. By Björn Tillenius

Remove the workarounds put in place for precise.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches