summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-11-03 17:28:30 -0800
committerJohn Keiser <john@johnkeiser.com>2015-11-03 17:28:30 -0800
commitce1b28f89f941a8c8017e0219fbbc8555bbbb6d6 (patch)
tree060e833a5423561c9178e68ee79d2453b665e946
parent0f61b7ebaf6823ab67e4c808830a52889617f709 (diff)
downloadchef-jk/run-oc-pedant.tar.gz
Use pedant config from chef-zerojk/run-oc-pedant
-rw-r--r--spec/support/pedant/pedant_config.rb113
1 files changed, 58 insertions, 55 deletions
diff --git a/spec/support/pedant/pedant_config.rb b/spec/support/pedant/pedant_config.rb
index 3f8219fc59..7feb0a94b8 100644
--- a/spec/support/pedant/pedant_config.rb
+++ b/spec/support/pedant/pedant_config.rb
@@ -21,12 +21,11 @@
################################################################################
# You MUST specify the address of the server the API requests will be
# sent to. Only specify protocol, hostname, and port.
-# NOTE this is assigned in run_pedant.rb, because it's possible 8889 will not be the port chosen.
-#chef_server 'http://127.0.0.1:8889'
+chef_server 'http://127.0.0.1:8889'
# If you are doing development testing, you can specify the address of
# the Solr server. The presence of this parameter will enable tests
-# to force commits to Solr, greatly decreasing the amount of time
+# to force commits to Solr, greatly decreasing the amout of time
# needed for testing the search endpoint. This is only an
# optimization for development! If you are testing a "live" Chef
# Server, or otherwise do not have access to the Solr server from your
@@ -36,7 +35,7 @@
#search_server "http://localhost:8983"
# Related to the 'search_server' parameter, this specifies the maximum
-# amount of time (in seconds) that search endpoint requests should be
+# amout of time (in seconds) that search endpoint requests should be
# retried before giving up. If not explicitly set, it will default to
# 65 seconds; only set it if you know that your Solr commit interval
# differs significantly from this.
@@ -60,6 +59,12 @@ explicit_port_url true
# value.
include_internal false
+# This is the bit that is different from pedant.rb
+org({:name => "pedant-testorg",
+ :create_me => true})
+internal_account_url chef_server
+delete_org true
+
# Test users. The five users specified below are required; their
# names (:user, :non_org_user, etc.) are indicative of their role
# within the tests. All users must have a ':name' key. If they have
@@ -68,62 +73,60 @@ include_internal false
# which should be the fully-qualified path /on the machine Pedant is
# running on/ to a private key for that user.
key = 'spec/support/pedant/stickywicket.pem'
-superuser_name 'admin'
+superuser_name 'pivotal'
superuser_key key
webui_key key
-# When we updated Chef to RSpec 3 there were gem conflicts with chef-pedant.
-# We removed chef as a chef-pedant gem dependency in pedant.gemfile, but this
-# caused chef-pedant to fail because it could not query for the chef version
-# on the box pedant is running on. X-Chef-Version isn't needed in server
-# requests for these tests, so we've disabled it.
-ingore_x_chef_version true
+requestors({
+ :clients => {
+ # The the admin user, for the purposes of getting things rolling
+ :admin => {
+ :name => "pedant_admin_client",
+ :create_me => true,
+ :create_knife => true,
+ :admin => true
+ },
+ :non_admin => {
+ :name => 'pedant_client',
+ :create_me => true,
+ :create_knife => true,
+ },
+ :bad => {
+ :name => 'bad_client',
+ :create_me => true,
+ :create_knife => true,
+ :bogus => true
+ }
+ },
-# Set the platform_class
-platform_class Pedant::OpenSourcePlatform
+ :users => {
+ # An administrator in the testing organization
+ :admin => {
+ :name => "pedant_admin_user",
+ :create_me => true,
+ :create_knife => true
+ },
-requestors({
- :clients => {
- # The the admin user, for the purposes of getting things rolling
- :admin => {
- :name => "pedant_admin_client",
- :create_me => true,
- :create_knife => true,
- :admin => true
- },
- :non_admin => {
- :name => 'pedant_client',
- :create_me => true,
- :create_knife => true
- },
- :bad => {
- :name => 'bad_client',
- :bogus => true
- }
- },
- :users => {
- :admin => {
- :name => "admin",
- :key_file => key,
- :create_me => false,
- :create_knife => false,
- :admin => true
- },
- :non_admin => {
- :name => "pedant_non_admin_user",
- :create_me => true,
- :create_knife => true,
- :admin => false
- },
- # A user for Knife tests. A knife.rb and key files will be set up
- # for this user
- :knife_user => {
- :name => "knifey",
- :create_me => true,
- :create_knife => true
- }
- }
-})
+ :non_admin => {
+ :name => "pedant_user",
+ :create_me => true,
+ :create_knife => true
+ },
+
+ # A user that is not a member of the testing organization
+ :bad => {
+ :name => "pedant-nobody",
+ :create_me => true,
+ :create_knife => true,
+ :associate => false
+ },
+ }
+ })
self[:tags] = [:validation, :authentication, :authorization]
verify_error_messages false
+
+ruby_users_endpoint? false
+ruby_acls_endpoint? false
+ruby_org_assoc? false
+chef_12? true