add interfaces-shutdown-introspection spread test #3272

Merged
merged 8 commits into from May 8, 2017

Conversation

Projects
None yet
4 participants
Contributor

jdstrand commented May 4, 2017

As a follow-on to #3266, add interfaces-shutdown-introspection spread test. This can only be run on classic since the PR uses an internal snap and dbus-send and only the unity7 implicit classic interface allows use of dbus-send. If this is deemed a problem, we could create a snap in the store or adjust the security policy to allow dbus-send. Since this test is only about showing that introspection works at all anywhere (the introspection rules add in PR#3266 will be the same regardless of target OS), 'classic ubuntu' counts as 'anywhere' and I therefore feel this test is fine as is.

Test based on existing interfaces-system-observe test.

Supernice, thanks a lot for this test! :) A small nitpick about the MATCH function, you can ignore it as other tests are using yet grep and we can update them altogether 👍

+ DISCONNECTED_PATTERN="(?s).*?\n- +shutdown-introspection-consumer:shutdown"
+
+ echo "Then the plug is shown as disconnected"
+ snap interfaces | grep -Pzq "$DISCONNECTED_PATTERN"
@fgimenez

fgimenez May 4, 2017

Contributor

We are currently using the MATCH function instead of grep (still not updated old tests though), replacing all the grep -Pq[z] occurrences with MATCH should just work.

jdstrand added some commits May 4, 2017

zyga approved these changes May 8, 2017

LGTM, feel free to remove the restore: | section now or in a follow-up later.

+ the Introspect method on org.freedesktop.login1.
+
+restore: |
+ rm -f shutdown-introspection-consumer_1.0_all.snap
@zyga

zyga May 8, 2017

Contributor

You don't need this restore section.

chipaca approved these changes May 8, 2017

I was about to merge it but thought I'd let you decide whether to drop the restore or just merge as-is.

Contributor

jdstrand commented May 8, 2017

Thanks for the reviews! Merging now that I removed 'restore' from the spread test.

@jdstrand jdstrand merged commit 0613ade into snapcore:master May 8, 2017

7 checks passed

artful-amd64 autopkgtest finished (success)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
xenial-amd64 autopkgtest finished (success)
Details
xenial-i386 autopkgtest finished (success)
Details
xenial-ppc64el autopkgtest finished (success)
Details
yakkety-amd64 autopkgtest finished (success)
Details
zesty-amd64 autopkgtest finished (success)
Details

@jdstrand jdstrand deleted the jdstrand:spread-test-for-introspection branch Jun 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment