Commit cd2932ec authored by intrigeri's avatar intrigeri
Browse files

Test suite: make the "Syncing OpenPGP keys using Seahorse" tests more robust...

Test suite: make the "Syncing OpenPGP keys using Seahorse" tests more robust wrt. new subkeys and other kinds of self-certification (refs: #15771).

Otherwise it will break next time dkg adds a subkey to his key.
parent b99fdd12
......@@ -27,12 +27,12 @@ def start_or_restart_seahorse
step 'Seahorse has opened'
end
Then /^the key "([^"]+)" has (only|more than) (\d+) signatures$/ do |key, qualifier, num|
Then /^the key "([^"]+)" has (less|more) than (\d+) signatures$/ do |key, qualifier, num|
count = count_gpg_signatures(key)
case qualifier
when 'only'
assert_equal(count, num.to_i, "Expected #{num} signatures but instead found #{count}")
when 'more than'
when 'less'
assert(count < num.to_i, "Expected less than #{num} signatures but found #{count}")
when 'more'
assert(count > num.to_i, "Expected more than #{num} signatures but found #{count}")
else
raise "Unknown operator #{qualifier} passed"
......
......@@ -32,22 +32,22 @@ Feature: Keyserver interaction with GnuPG
Given I fetch the "0EE5BE979282D80B9F7540F1CCD2ED94D21739E9" OpenPGP key using the GnuPG CLI without any signatures
And the GnuPG fetch is successful
And the "0EE5BE979282D80B9F7540F1CCD2ED94D21739E9" key is in the live user's public keyring
But the key "0EE5BE979282D80B9F7540F1CCD2ED94D21739E9" has only 10 signatures
But the key "0EE5BE979282D80B9F7540F1CCD2ED94D21739E9" has less than 42 signatures
When I start Seahorse
Then Seahorse has opened
And I enable key synchronization in Seahorse
And I synchronize keys in Seahorse
And the Seahorse operation is successful
Then the key "0EE5BE979282D80B9F7540F1CCD2ED94D21739E9" has more than 10 signatures
Then the key "0EE5BE979282D80B9F7540F1CCD2ED94D21739E9" has more than 42 signatures
Scenario: Syncing OpenPGP keys using Seahorse started from the OpenPGP Applet should work and be done over Tor.
Given I fetch the "0EE5BE979282D80B9F7540F1CCD2ED94D21739E9" OpenPGP key using the GnuPG CLI without any signatures
And the GnuPG fetch is successful
And the "0EE5BE979282D80B9F7540F1CCD2ED94D21739E9" key is in the live user's public keyring
But the key "0EE5BE979282D80B9F7540F1CCD2ED94D21739E9" has only 10 signatures
But the key "0EE5BE979282D80B9F7540F1CCD2ED94D21739E9" has less than 42 signatures
When I start Seahorse via the OpenPGP Applet
Then Seahorse has opened
And I enable key synchronization in Seahorse
And I synchronize keys in Seahorse
And the Seahorse operation is successful
Then the key "0EE5BE979282D80B9F7540F1CCD2ED94D21739E9" has more than 10 signatures
Then the key "0EE5BE979282D80B9F7540F1CCD2ED94D21739E9" has more than 42 signatures
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment