Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Cleanup gpg-tests a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Weiss committed Jul 6, 2012
1 parent 451781f commit 985043c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 65 deletions.
2 changes: 1 addition & 1 deletion src/katello/locators.clj
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
;;redhat page
:subscriptions-items "//table[@id='redhatSubscriptionTable']/tbody/tr"

;;z keys
;;gpg keys
:gpg-key-name-text "gpg_key_name"
:gpg-key-file-upload-text "gpg_key_content_upload"
:gpg-key-upload-button "upload_gpg_key"
Expand Down
86 changes: 22 additions & 64 deletions src/katello/tests/providers.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
[bugzilla.checker :only [open-bz-bugs]]
[katello.conf :only [config no-clients-defined]]))

;; Constants

(def tmpfile (str (System/getProperty "user.dir") "/output.txt"))

;; Functions

(defn get-all-providers "Uses API to return all provider names in the admin org"
Expand Down Expand Up @@ -101,6 +105,22 @@
(load "providers/redhat")


(defgroup gpg-key-tests

(deftest "Create new GPG keys test"
:blocked-by (open-bz-bugs "835902")

(with-unique [test-key "test-key"]
(spit "output.txt" "test")
(katello.ui-tasks/create-gpg-key test-key {:filename tmpfile})))

(deftest "Delete existing GPG key"
(with-unique [test-key "test-key"]
(spit "output.txt" "test")
(katello.ui-tasks/create-gpg-key test-key {:filename tmpfile})
(katello.ui-tasks/remove-gpg-key test-key))))


(defgroup provider-tests

(deftest "Create a custom provider"
Expand Down Expand Up @@ -143,72 +163,10 @@
custom-product-tests)

redhat-content-provider-tests
gpg-key-tests
redhat-provider-one-org-multiple-manifest-tests
redhat-provider-second-org-one-manifest-tests
redhat-provider-used-manifest-tests
redhat-provider-other-manifest-tests
)
redhat-provider-other-manifest-tests)


(defgroup gpg-key-tests

(deftest "Create new GPG keys test" :blocked-by (open-bz-bugs "835902")
(with-unique [test-key "test-key"]
(spit "output.txt" "test")
(katello.ui-tasks/create-gpg-key test-key {:filename (str (System/getProperty "user.dir") "/output.txt")})))

(deftest "Delete existing GPG key"
(with-unique [test-key "test-key"]
(spit "output.txt" "test")
(katello.ui-tasks/create-gpg-key test-key {:filename (str (System/getProperty "user.dir") "/output.txt")})
(katello.ui-tasks/remove-gpg-key test-key))))


















































0 comments on commit 985043c

Please sign in to comment.