summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Doherty <cdoherty@chef.io>2015-11-10 13:48:24 -0800
committerChris Doherty <cdoherty@chef.io>2015-11-10 15:12:04 -0800
commitadc16239316d4e67929db12211700c7cd96b1c67 (patch)
tree4c500f1b6a73ea9cd3468c2026abe471fe88e414
parent61322db2fcbf1c5fa56bb7a52a35070e0a9fe12c (diff)
downloadchef-zero-adc16239316d4e67929db12211700c7cd96b1c67.tar.gz
Use 'pivotal' for requestor admin user under CHEF_FS.
-rw-r--r--spec/support/oc_pedant.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/support/oc_pedant.rb b/spec/support/oc_pedant.rb
index c16ac60..1be7ddf 100644
--- a/spec/support/oc_pedant.rb
+++ b/spec/support/oc_pedant.rb
@@ -82,6 +82,10 @@ superuser_name 'pivotal'
superuser_key key
webui_key key
+def cheffs_or_else_user(value)
+ ENV['CHEF_FS'] ? "pivotal" : value
+end
+
requestors({
:clients => {
# The the admin user, for the purposes of getting things rolling
@@ -107,20 +111,20 @@ requestors({
:users => {
# An administrator in the testing organization
:admin => {
- :name => "pedant_admin_user",
+ :name => cheffs_or_else_user("pedant_admin_user"),
:create_me => true,
:create_knife => true
},
:non_admin => {
- :name => "pedant_user",
+ :name => cheffs_or_else_user("pedant_user"),
:create_me => true,
:create_knife => true
},
# A user that is not a member of the testing organization
:bad => {
- :name => "pedant-nobody",
+ :name => cheffs_or_else_user("pedant-nobody"),
:create_me => true,
:create_knife => true,
:associate => false