chef-zero 4.2.3 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +201 -201
  3. data/README.md +155 -150
  4. data/Rakefile +31 -31
  5. data/bin/chef-zero +100 -100
  6. data/lib/chef_zero.rb +10 -7
  7. data/lib/chef_zero/chef_data/acl_path.rb +139 -139
  8. data/lib/chef_zero/chef_data/cookbook_data.rb +240 -240
  9. data/lib/chef_zero/chef_data/data_normalizer.rb +207 -207
  10. data/lib/chef_zero/chef_data/default_creator.rb +446 -446
  11. data/lib/chef_zero/data_store/data_already_exists_error.rb +29 -29
  12. data/lib/chef_zero/data_store/data_error.rb +31 -31
  13. data/lib/chef_zero/data_store/data_not_found_error.rb +28 -28
  14. data/lib/chef_zero/data_store/default_facade.rb +149 -149
  15. data/lib/chef_zero/data_store/interface_v1.rb +67 -67
  16. data/lib/chef_zero/data_store/interface_v2.rb +18 -18
  17. data/lib/chef_zero/data_store/memory_store.rb +33 -33
  18. data/lib/chef_zero/data_store/memory_store_v2.rb +155 -155
  19. data/lib/chef_zero/data_store/raw_file_store.rb +147 -147
  20. data/lib/chef_zero/data_store/v1_to_v2_adapter.rb +142 -142
  21. data/lib/chef_zero/data_store/v2_to_v1_adapter.rb +107 -107
  22. data/lib/chef_zero/endpoints/acl_endpoint.rb +38 -38
  23. data/lib/chef_zero/endpoints/acls_endpoint.rb +29 -29
  24. data/lib/chef_zero/endpoints/actor_endpoint.rb +94 -88
  25. data/lib/chef_zero/endpoints/actors_endpoint.rb +64 -64
  26. data/lib/chef_zero/endpoints/authenticate_user_endpoint.rb +31 -31
  27. data/lib/chef_zero/endpoints/container_endpoint.rb +22 -22
  28. data/lib/chef_zero/endpoints/containers_endpoint.rb +13 -13
  29. data/lib/chef_zero/endpoints/cookbook_endpoint.rb +39 -39
  30. data/lib/chef_zero/endpoints/cookbook_version_endpoint.rb +119 -119
  31. data/lib/chef_zero/endpoints/cookbooks_base.rb +65 -65
  32. data/lib/chef_zero/endpoints/cookbooks_endpoint.rb +19 -19
  33. data/lib/chef_zero/endpoints/data_bag_endpoint.rb +45 -45
  34. data/lib/chef_zero/endpoints/data_bag_item_endpoint.rb +25 -25
  35. data/lib/chef_zero/endpoints/data_bags_endpoint.rb +23 -23
  36. data/lib/chef_zero/endpoints/environment_cookbook_endpoint.rb +24 -24
  37. data/lib/chef_zero/endpoints/environment_cookbook_versions_endpoint.rb +123 -123
  38. data/lib/chef_zero/endpoints/environment_cookbooks_endpoint.rb +22 -22
  39. data/lib/chef_zero/endpoints/environment_endpoint.rb +33 -33
  40. data/lib/chef_zero/endpoints/environment_nodes_endpoint.rb +23 -23
  41. data/lib/chef_zero/endpoints/environment_recipes_endpoint.rb +22 -22
  42. data/lib/chef_zero/endpoints/environment_role_endpoint.rb +36 -36
  43. data/lib/chef_zero/endpoints/file_store_file_endpoint.rb +22 -22
  44. data/lib/chef_zero/endpoints/group_endpoint.rb +20 -20
  45. data/lib/chef_zero/endpoints/groups_endpoint.rb +13 -13
  46. data/lib/chef_zero/endpoints/license_endpoint.rb +25 -25
  47. data/lib/chef_zero/endpoints/node_endpoint.rb +17 -17
  48. data/lib/chef_zero/endpoints/node_identifiers_endpoint.rb +22 -0
  49. data/lib/chef_zero/endpoints/not_found_endpoint.rb +11 -11
  50. data/lib/chef_zero/endpoints/organization_association_request_endpoint.rb +22 -22
  51. data/lib/chef_zero/endpoints/organization_association_requests_endpoint.rb +30 -29
  52. data/lib/chef_zero/endpoints/organization_authenticate_user_endpoint.rb +26 -26
  53. data/lib/chef_zero/endpoints/organization_endpoint.rb +46 -41
  54. data/lib/chef_zero/endpoints/organization_user_base.rb +15 -0
  55. data/lib/chef_zero/endpoints/organization_user_endpoint.rb +26 -48
  56. data/lib/chef_zero/endpoints/organization_users_endpoint.rb +43 -14
  57. data/lib/chef_zero/endpoints/organization_validator_key_endpoint.rb +20 -20
  58. data/lib/chef_zero/endpoints/organizations_endpoint.rb +62 -55
  59. data/lib/chef_zero/endpoints/policies_endpoint.rb +151 -154
  60. data/lib/chef_zero/endpoints/principal_endpoint.rb +42 -42
  61. data/lib/chef_zero/endpoints/rest_list_endpoint.rb +42 -42
  62. data/lib/chef_zero/endpoints/rest_object_endpoint.rb +63 -63
  63. data/lib/chef_zero/endpoints/role_endpoint.rb +16 -16
  64. data/lib/chef_zero/endpoints/role_environments_endpoint.rb +14 -14
  65. data/lib/chef_zero/endpoints/sandbox_endpoint.rb +27 -27
  66. data/lib/chef_zero/endpoints/sandboxes_endpoint.rb +50 -50
  67. data/lib/chef_zero/endpoints/search_endpoint.rb +194 -192
  68. data/lib/chef_zero/endpoints/searches_endpoint.rb +18 -18
  69. data/lib/chef_zero/endpoints/server_api_version_endpoint.rb +14 -0
  70. data/lib/chef_zero/endpoints/system_recovery_endpoint.rb +30 -30
  71. data/lib/chef_zero/endpoints/user_association_request_endpoint.rb +40 -40
  72. data/lib/chef_zero/endpoints/user_association_requests_count_endpoint.rb +19 -19
  73. data/lib/chef_zero/endpoints/user_association_requests_endpoint.rb +19 -19
  74. data/lib/chef_zero/endpoints/user_organizations_endpoint.rb +22 -22
  75. data/lib/chef_zero/endpoints/version_endpoint.rb +12 -12
  76. data/lib/chef_zero/log.rb +7 -7
  77. data/lib/chef_zero/rest_base.rb +242 -214
  78. data/lib/chef_zero/rest_error_response.rb +11 -11
  79. data/lib/chef_zero/rest_request.rb +69 -65
  80. data/lib/chef_zero/rest_router.rb +45 -45
  81. data/lib/chef_zero/rspec.rb +308 -308
  82. data/lib/chef_zero/server.rb +642 -637
  83. data/lib/chef_zero/socketless_server_map.rb +92 -92
  84. data/lib/chef_zero/solr/query/binary_operator.rb +52 -52
  85. data/lib/chef_zero/solr/query/phrase.rb +23 -23
  86. data/lib/chef_zero/solr/query/range_query.rb +46 -46
  87. data/lib/chef_zero/solr/query/regexpable_query.rb +29 -29
  88. data/lib/chef_zero/solr/query/subquery.rb +37 -37
  89. data/lib/chef_zero/solr/query/term.rb +45 -45
  90. data/lib/chef_zero/solr/query/unary_operator.rb +43 -43
  91. data/lib/chef_zero/solr/solr_doc.rb +53 -53
  92. data/lib/chef_zero/solr/solr_parser.rb +203 -203
  93. data/lib/chef_zero/version.rb +3 -3
  94. data/spec/run_oc_pedant.rb +63 -56
  95. data/spec/search_spec.rb +32 -32
  96. data/spec/server_spec.rb +92 -91
  97. data/spec/socketless_server_map_spec.rb +76 -76
  98. data/spec/support/oc_pedant.rb +132 -134
  99. data/spec/support/stickywicket.pem +27 -27
  100. metadata +10 -15
  101. data/spec/run_pedant.rb +0 -103
  102. data/spec/support/pedant.rb +0 -129
@@ -1,134 +1,132 @@
1
- # Copyright: Copyright (c) 2012 Opscode, Inc.
2
- # License: Apache License, Version 2.0
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
- # This annotated Pedant configuration file details the various
17
- # configuration settings available to you. It is separate from the
18
- # actual Pedant::Config class because not all settings have sane
19
- # defaults, and not all settings are appropriate in all settings.
20
-
21
- ################################################################################
22
- # You MUST specify the address of the server the API requests will be
23
- # sent to. Only specify protocol, hostname, and port.
24
- chef_server 'http://127.0.0.1:8889'
25
-
26
- # If you are doing development testing, you can specify the address of
27
- # the Solr server. The presence of this parameter will enable tests
28
- # to force commits to Solr, greatly decreasing the amout of time
29
- # needed for testing the search endpoint. This is only an
30
- # optimization for development! If you are testing a "live" Chef
31
- # Server, or otherwise do not have access to the Solr server from your
32
- # testing location, you should not specify a value for this parameter.
33
- # The tests will still run, albeit slower, as they will now need to
34
- # poll for a period to ensure they are querying committed results.
35
- #search_server "http://localhost:8983"
36
-
37
- # Related to the 'search_server' parameter, this specifies the maximum
38
- # amout of time (in seconds) that search endpoint requests should be
39
- # retried before giving up. If not explicitly set, it will default to
40
- # 65 seconds; only set it if you know that your Solr commit interval
41
- # differs significantly from this.
42
- maximum_search_time 0
43
-
44
- # OSC sends erchef a host header with a port, so this option needs
45
- # # to be enabled for Pedant tests to work correctly
46
- explicit_port_url true
47
-
48
- # We're starting to break tests up into groups based on different
49
- # criteria. The proper API tests (the results of which are viewable
50
- # to OPC customers) should be the only ones run by Pedant embedded in
51
- # OPC installs. There are other specs that help us keep track of API
52
- # cruft that we want to come back and fix later; these shouldn't be
53
- # viewable to customers, but we should be able to run them in
54
- # development and CI environments. If this parameter is missing or
55
- # explicitly `false` only the customer-friendly tests will be run.
56
- #
57
- # This is mainly here for documentation purposes, since the
58
- # command-line `opscode-pedant` utility ultimately determines this
59
- # value.
60
- include_internal false
61
-
62
- # This is the bit that is different from pedant.rb
63
- org({:name => "pedant-testorg",
64
- :create_me => true})
65
- internal_account_url chef_server
66
- delete_org true
67
-
68
- # Test users. The five users specified below are required; their
69
- # names (:user, :non_org_user, etc.) are indicative of their role
70
- # within the tests. All users must have a ':name' key. If they have
71
- # a ':create_me' key, Pedant will create these users for you. If you
72
- # are using pre-existing users, you must supply a ':key_file' key,
73
- # which should be the fully-qualified path /on the machine Pedant is
74
- # running on/ to a private key for that user.
75
- key = 'spec/support/stickywicket.pem'
76
- superuser_name 'pivotal'
77
- superuser_key key
78
- webui_key key
79
-
80
- # Set the platform_class
81
- platform_class Pedant::MultiTenantPlatform
82
-
83
- requestors({
84
- :clients => {
85
- # The the admin user, for the purposes of getting things rolling
86
- :admin => {
87
- :name => "pedant_admin_client",
88
- :create_me => true,
89
- :create_knife => true,
90
- :admin => true
91
- },
92
- :non_admin => {
93
- :name => 'pedant_client',
94
- :create_me => true,
95
- :create_knife => true,
96
- },
97
- :bad => {
98
- :name => 'bad_client',
99
- :create_me => true,
100
- :create_knife => true,
101
- :bogus => true
102
- }
103
- },
104
-
105
- :users => {
106
- # An administrator in the testing organization
107
- :admin => {
108
- :name => "pedant_admin_user",
109
- :create_me => true,
110
- :create_knife => true
111
- },
112
-
113
- :non_admin => {
114
- :name => "pedant_user",
115
- :create_me => true,
116
- :create_knife => true
117
- },
118
-
119
- # A user that is not a member of the testing organization
120
- :bad => {
121
- :name => "pedant-nobody",
122
- :create_me => true,
123
- :create_knife => true,
124
- :associate => false
125
- },
126
- }
127
- })
128
-
129
- self[:tags] = [:validation, :authentication, :authorization]
130
- verify_error_messages false
131
-
132
- ruby_users_endpoint? false
133
- ruby_acls_endpoint? false
134
- ruby_org_assoc? false
1
+ # Copyright: Copyright (c) 2012 Opscode, Inc.
2
+ # License: Apache License, Version 2.0
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ # This annotated Pedant configuration file details the various
17
+ # configuration settings available to you. It is separate from the
18
+ # actual Pedant::Config class because not all settings have sane
19
+ # defaults, and not all settings are appropriate in all settings.
20
+
21
+ ################################################################################
22
+ # You MUST specify the address of the server the API requests will be
23
+ # sent to. Only specify protocol, hostname, and port.
24
+ chef_server 'http://127.0.0.1:8889'
25
+
26
+ # If you are doing development testing, you can specify the address of
27
+ # the Solr server. The presence of this parameter will enable tests
28
+ # to force commits to Solr, greatly decreasing the amout of time
29
+ # needed for testing the search endpoint. This is only an
30
+ # optimization for development! If you are testing a "live" Chef
31
+ # Server, or otherwise do not have access to the Solr server from your
32
+ # testing location, you should not specify a value for this parameter.
33
+ # The tests will still run, albeit slower, as they will now need to
34
+ # poll for a period to ensure they are querying committed results.
35
+ #search_server "http://localhost:8983"
36
+
37
+ # Related to the 'search_server' parameter, this specifies the maximum
38
+ # amout of time (in seconds) that search endpoint requests should be
39
+ # retried before giving up. If not explicitly set, it will default to
40
+ # 65 seconds; only set it if you know that your Solr commit interval
41
+ # differs significantly from this.
42
+ maximum_search_time 0
43
+
44
+ # OSC sends erchef a host header with a port, so this option needs
45
+ # # to be enabled for Pedant tests to work correctly
46
+ explicit_port_url true
47
+
48
+ # We're starting to break tests up into groups based on different
49
+ # criteria. The proper API tests (the results of which are viewable
50
+ # to OPC customers) should be the only ones run by Pedant embedded in
51
+ # OPC installs. There are other specs that help us keep track of API
52
+ # cruft that we want to come back and fix later; these shouldn't be
53
+ # viewable to customers, but we should be able to run them in
54
+ # development and CI environments. If this parameter is missing or
55
+ # explicitly `false` only the customer-friendly tests will be run.
56
+ #
57
+ # This is mainly here for documentation purposes, since the
58
+ # command-line `opscode-pedant` utility ultimately determines this
59
+ # value.
60
+ include_internal false
61
+
62
+ # This is the bit that is different from pedant.rb
63
+ org({:name => "pedant-testorg",
64
+ :create_me => true})
65
+ internal_account_url chef_server
66
+ delete_org true
67
+
68
+ # Test users. The five users specified below are required; their
69
+ # names (:user, :non_org_user, etc.) are indicative of their role
70
+ # within the tests. All users must have a ':name' key. If they have
71
+ # a ':create_me' key, Pedant will create these users for you. If you
72
+ # are using pre-existing users, you must supply a ':key_file' key,
73
+ # which should be the fully-qualified path /on the machine Pedant is
74
+ # running on/ to a private key for that user.
75
+ key = 'spec/support/stickywicket.pem'
76
+ superuser_name 'pivotal'
77
+ superuser_key key
78
+ webui_key key
79
+
80
+ requestors({
81
+ :clients => {
82
+ # The the admin user, for the purposes of getting things rolling
83
+ :admin => {
84
+ :name => "pedant_admin_client",
85
+ :create_me => true,
86
+ :create_knife => true,
87
+ :admin => true
88
+ },
89
+ :non_admin => {
90
+ :name => 'pedant_client',
91
+ :create_me => true,
92
+ :create_knife => true,
93
+ },
94
+ :bad => {
95
+ :name => 'bad_client',
96
+ :create_me => true,
97
+ :create_knife => true,
98
+ :bogus => true
99
+ }
100
+ },
101
+
102
+ :users => {
103
+ # An administrator in the testing organization
104
+ :admin => {
105
+ :name => "pedant_admin_user",
106
+ :create_me => true,
107
+ :create_knife => true
108
+ },
109
+
110
+ :non_admin => {
111
+ :name => "pedant_user",
112
+ :create_me => true,
113
+ :create_knife => true
114
+ },
115
+
116
+ # A user that is not a member of the testing organization
117
+ :bad => {
118
+ :name => "pedant-nobody",
119
+ :create_me => true,
120
+ :create_knife => true,
121
+ :associate => false
122
+ },
123
+ }
124
+ })
125
+
126
+ self[:tags] = [:validation, :authentication, :authorization]
127
+ verify_error_messages false
128
+
129
+ ruby_users_endpoint? false
130
+ ruby_acls_endpoint? false
131
+ ruby_org_assoc? false
132
+ chef_12? true
@@ -1,27 +1,27 @@
1
- -----BEGIN RSA PRIVATE KEY-----
2
- MIIEpQIBAAKCAQEApNCkX2k+lFGDWRVhX4uClaVQrumG9XXvk6X7M2izrIg7RzMP
3
- Dk4thhZkpx5gr22By7PZQdMEjWC/Zo8MBjtoJ0GV0jw8npefbU1MGKs2dtpYgo0N
4
- Fq8fX8MdFPu4h2W3g0dMEdhT8icc2H4EjhZmdeUhUn3RIEt2duCgp3YDYnUUZx3j
5
- N7MHcTIdzD58ikr6zQrZzHOv+OOI86Xk9EpyEEQizOLoQxkICNrhqN7ElQDuvXaX
6
- BSBrYDRKH2umBMMcXzvsR/SvkmqxoEESSpIlW8zeKAWQ+znNjDC0tmTg7jZmgSP7
7
- siKrwo4t4ebjcmjpIoi/JKww/nGN3Uhz1ZOZuwIDAQABAoIBAQCaJQD2s0nyEeKU
8
- uKhfYe155Cl3zbWJcQnmv4AXbr9MiAVY6+oS6Q8ur1bn7kNjDzoruENjiuZhC7E3
9
- TGZklb8tp+tluyy+7vQOmBKpp8fClSfewekR5CultqhGbb8B8yIVR+NfdUHd4rLZ
10
- z9KWyWB+txPZQQ8L80gSmrfmpzs3IuT7oPvmtBU1Wq9QapC4n/rUohHUpUV1du4G
11
- 0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YQZMlb2xt8yZYx/ZZK
17
+ wjkr9rcAPEQIQZ2A6NUbGq6qCD7sSmg6UAi0CgiqTokQ/Wtag0UDvFMzwerdg/On
18
+ 37uxffpxpte8z1jYi/MxRaoTYueuc1UVnqofVIM7AoGBALZJzwPzUY/bVAADUJmd
19
+ lYZiFsAGBF42/E05MOgH1GaK/ZWy/fkouDLsfK67XaK7JZk6ajLSDLG9R1kxRym6
20
+ y2FoGFtiKPfo8xIenrNhx3gCrG/jVjB9UYyXWiKNXifukr9M8/SkdBfFGWsZYqGd
21
+ fmXVMiVaFoVcce8hLxwWWEABAoGBAKcyhKX/HEj6YFqlIoqkydDAylXs1jicZ27l
22
+ rF2yum8KXZpMMdzbutuKsdAD8Ql0K6NB4a+jByuiTMn5/11cJxUEqkgM9sArZQW+
23
+ tH2+r+/VQpyTS0/rpXVGj/2nl2K1kI2T4R36e/aTl6CanWweAf9JK/lC9rxKyxg+
24
+ p6SaFuObAoGACP6TKCkp2oymXlKgdUUgPrnsaz2VAw8jD5QHtx10U4wty0C8gxsk
25
+ MLe00h09iLPyFmvJpD+MgbxV/r6RrZeVdsKdU/5LG52YgiVSTaizyy+ciEfW7xoQ
26
+ CL5EtZd8Cn5OKinBEzzFpELqunlqepIKCIDOcLKz/cjR+3a+E6Zx5Wo=
27
+ -----END RSA PRIVATE KEY-----
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.3
4
+ version: 4.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-19 00:00:00.000000000 Z
11
+ date: 2015-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-log
@@ -56,22 +56,16 @@ dependencies:
56
56
  name: ffi-yajl
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '1.1'
62
- - - "<"
59
+ - - "~>"
63
60
  - !ruby/object:Gem::Version
64
- version: '3.0'
61
+ version: '2.2'
65
62
  type: :runtime
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- version: '1.1'
72
- - - "<"
66
+ - - "~>"
73
67
  - !ruby/object:Gem::Version
74
- version: '3.0'
68
+ version: '2.2'
75
69
  - !ruby/object:Gem::Dependency
76
70
  name: rack
77
71
  requirement: !ruby/object:Gem::Requirement
@@ -168,11 +162,13 @@ files:
168
162
  - lib/chef_zero/endpoints/groups_endpoint.rb
169
163
  - lib/chef_zero/endpoints/license_endpoint.rb
170
164
  - lib/chef_zero/endpoints/node_endpoint.rb
165
+ - lib/chef_zero/endpoints/node_identifiers_endpoint.rb
171
166
  - lib/chef_zero/endpoints/not_found_endpoint.rb
172
167
  - lib/chef_zero/endpoints/organization_association_request_endpoint.rb
173
168
  - lib/chef_zero/endpoints/organization_association_requests_endpoint.rb
174
169
  - lib/chef_zero/endpoints/organization_authenticate_user_endpoint.rb
175
170
  - lib/chef_zero/endpoints/organization_endpoint.rb
171
+ - lib/chef_zero/endpoints/organization_user_base.rb
176
172
  - lib/chef_zero/endpoints/organization_user_endpoint.rb
177
173
  - lib/chef_zero/endpoints/organization_users_endpoint.rb
178
174
  - lib/chef_zero/endpoints/organization_validator_key_endpoint.rb
@@ -187,6 +183,7 @@ files:
187
183
  - lib/chef_zero/endpoints/sandboxes_endpoint.rb
188
184
  - lib/chef_zero/endpoints/search_endpoint.rb
189
185
  - lib/chef_zero/endpoints/searches_endpoint.rb
186
+ - lib/chef_zero/endpoints/server_api_version_endpoint.rb
190
187
  - lib/chef_zero/endpoints/system_recovery_endpoint.rb
191
188
  - lib/chef_zero/endpoints/user_association_request_endpoint.rb
192
189
  - lib/chef_zero/endpoints/user_association_requests_count_endpoint.rb
@@ -212,12 +209,10 @@ files:
212
209
  - lib/chef_zero/solr/solr_parser.rb
213
210
  - lib/chef_zero/version.rb
214
211
  - spec/run_oc_pedant.rb
215
- - spec/run_pedant.rb
216
212
  - spec/search_spec.rb
217
213
  - spec/server_spec.rb
218
214
  - spec/socketless_server_map_spec.rb
219
215
  - spec/support/oc_pedant.rb
220
- - spec/support/pedant.rb
221
216
  - spec/support/stickywicket.pem
222
217
  homepage: http://www.opscode.com
223
218
  licenses:
@@ -239,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
234
  version: '0'
240
235
  requirements: []
241
236
  rubyforge_project:
242
- rubygems_version: 2.4.5
237
+ rubygems_version: 2.2.3
243
238
  signing_key:
244
239
  specification_version: 4
245
240
  summary: Self-contained, easy-setup, fast-start in-memory Chef server for testing
data/spec/run_pedant.rb DELETED
@@ -1,103 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'bundler'
3
- require 'bundler/setup'
4
-
5
- require 'chef_zero/server'
6
- require 'rspec/core'
7
-
8
- tmpdir = nil
9
-
10
- def start_local_server(chef_repo_path)
11
- Dir.mkdir(chef_repo_path) if !File.exists?(chef_repo_path)
12
-
13
- # 11.6 and below had a bug where it couldn't create the repo children automatically
14
- if Chef::VERSION.to_f < 11.8
15
- %w(clients cookbooks data_bags environments nodes roles users).each do |child|
16
- Dir.mkdir("#{chef_repo_path}/#{child}") if !File.exists?("#{chef_repo_path}/#{child}")
17
- end
18
- end
19
-
20
- # Start the new server
21
- Chef::Config.repo_mode = 'everything'
22
- Chef::Config.chef_repo_path = chef_repo_path
23
- Chef::Config.versioned_cookbooks = true
24
- chef_fs = Chef::ChefFS::Config.new.local_fs
25
- data_store = Chef::ChefFS::ChefFSDataStore.new(chef_fs)
26
- server = ChefZero::Server.new(:port => 8889, :data_store => data_store)
27
- ENV['SINGLE_ORG'] = 'true'
28
- server.start_background
29
- server
30
- end
31
-
32
- begin
33
- if ENV['CHEF_FS']
34
- require 'chef/chef_fs/chef_fs_data_store'
35
- require 'chef/chef_fs/config'
36
- require 'tmpdir'
37
- require 'fileutils'
38
- require 'chef/version'
39
- require 'chef_zero/data_store/v1_to_v2_adapter'
40
-
41
- # Create chef repository
42
- tmpdir = Dir.mktmpdir
43
- chef_repo_path = "#{tmpdir}/repo"
44
-
45
- # Capture setup data into master_chef_repo_path
46
- server = start_local_server(chef_repo_path)
47
-
48
- elsif ENV['SINGLE_ORG']
49
- server = ChefZero::Server.new(:port => 8889, :single_org => 'chef')
50
- server.start_background
51
-
52
- elsif ENV['FILE_STORE']
53
- require 'tmpdir'
54
- require 'chef_zero/data_store/raw_file_store'
55
- tmpdir = Dir.mktmpdir
56
- data_store = ChefZero::DataStore::RawFileStore.new(tmpdir, true)
57
- data_store = ChefZero::DataStore::DefaultFacade.new(data_store, true, false)
58
- server = ChefZero::Server.new(:port => 8889, :single_org => 'chef', :data_store => data_store)
59
- server.start_background
60
-
61
- else
62
- server = ChefZero::Server.new(:port => 8889, :single_org => false, :osc_compat => true)
63
- server.data_store.create_dir([ 'organizations' ], 'pedant')
64
- server.start_background
65
- end
66
-
67
- unless ENV['SKIP_PEDANT']
68
- require 'pedant'
69
- require 'pedant/opensource'
70
-
71
- #Pedant::Config.rerun = true
72
-
73
- Pedant.config.suite = 'api'
74
- Pedant.config[:config_file] = 'spec/support/pedant.rb'
75
-
76
- Pedant.setup([
77
- '--skip-knife',
78
- '--skip-validation',
79
- '--skip-authentication',
80
- '--skip-authorization',
81
- '--skip-keys',
82
- '--skip-omnibus',
83
- '--skip-cookbook_artifacts'
84
- ])
85
-
86
- result = RSpec::Core::Runner.run(Pedant.config.rspec_args)
87
- else
88
- require 'net/http'
89
- response = Net::HTTP.new('127.0.0.1', 8889).get("/environments", { 'Accept' => 'application/json'}).body
90
- if response =~ /_default/
91
- result = 0
92
- else
93
- puts "GET /environments returned #{response}. Expected _default!"
94
- result = 1
95
- end
96
- end
97
-
98
- server.stop if server.running?
99
- ensure
100
- FileUtils.remove_entry_secure(tmpdir) if tmpdir
101
- end
102
-
103
- exit(result)