From f72a82db99909239b127cadcd3c39d67caec90ff Mon Sep 17 00:00:00 2001 From: bagtoad <47394200+BagToad@users.noreply.github.com> Date: Thu, 24 Oct 2024 09:59:02 -0600 Subject: [PATCH] Refactor gpg-key delete to align with ssh-key delete --- acceptance/testdata/gpg-key/gpg-key.txtar | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/acceptance/testdata/gpg-key/gpg-key.txtar b/acceptance/testdata/gpg-key/gpg-key.txtar index dff028bab..8f0d71545 100644 --- a/acceptance/testdata/gpg-key/gpg-key.txtar +++ b/acceptance/testdata/gpg-key/gpg-key.txtar @@ -8,12 +8,16 @@ skip 'it modifies the user''s personal GitHub account GPG keys' # Add the gpg key to GH account exec gh gpg-key add gpg-key.pub -# Defer deleting the gpg key from GH account -defer gh gpg-key delete --yes 24C30F9C9115E747 - # Verify the gpg key was added to GH account exec gh gpg-key list -stdout 24C30F9C9115E747 +stdout '24C30F9C9115E747' + +# Delete the gpg key from GH account +exec gh gpg-key delete --yes '24C30F9C9115E747' + +# Check the key is deleted +exec gh gpg-key list +! stdout '24C30F9C9115E747' -- gpg-key.pub -- -----BEGIN PGP PUBLIC KEY BLOCK-----