Я играю, чтобы попытаться получить minitests, работающие на тестовой кухне с бродягой.начало шеф-повара не работает minitest с использованием бродяг и тестовой кухни
Мои собственные тесты прошли успешно, но поваренная книга повара-шеф-повара включает в себя тест для запуска шеф-повара, который не прошел тестовый прогон. Причина, по которой начинается отказ шеф-повара, заключается в том, что он не может аутентифицироваться с моим сервером шеф-повара, поскольку в поле нет ключа проверки клиента.
# Running tests:
chef-client::service#test_0001_starts the chef-client service = 0.03 s = F
ntp::default#test_0001_starts the NTP daemon = 0.15 s = .
ntp::default#test_0003_creates the ntp.conf = 0.01 s = .
ntp::default#test_0002_creates the leapfile = 0.00 s = .
recipe::my_cookbook::default::greeting file#test_0001_creates the greeting file = 0.00 s = .
recipe::my_cookbook::default::greeting file#test_0002_continas what's stored in the 'greeting' node attribute = 0.00 s = .
Finished tests in 0.199086s, 30.1377 tests/s, 55.2525 assertions/s.
1) Failure:
chef-client::service#test_0001_starts the chef-client service [/var/chef/minitest/chef-client/service_test.rb:25]:
Expected: true
Actual: false
6 tests, 11 assertions, 1 failures, 0 errors, 0 skips
[2013-11-24T13:07:45+00:00] INFO: Report handlers complete
[2013-11-24T13:07:45+00:00] ERROR: Running exception handlers
[2013-11-24T13:07:45+00:00] ERROR: Exception handlers complete
[2013-11-24T13:07:45+00:00] FATAL: Stacktrace dumped to /tmp/kitchen-chef-solo/cache/chef-stacktrace.out
Chef Client failed. 38 resources updated
[2013-11-24T13:07:45+00:00] ERROR: MiniTest failed with 1 failure(s) and 0 error(s).
Failure:
chef-client::service#test_0001_starts the chef-client service [/var/chef/minitest/chef-client/service_test.rb:25]:
Expected: true
Actual: false
[2013-11-24T13:07:45+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <default-ubuntu-1204>.
>>>>>> Please see .kitchen/logs/default-ubuntu-1204.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sudo -E chef-solo --config /tmp/kitchen-chef-solo/solo.rb --json-attributes /tmp/kitchen-chef-solo/dna.json --log_level info]
>>>>>> ----------------------
Вот результат ручного шеф-клиент перспективы на бродячего поля раскручивается на кухне испытания:
[email protected]:~$ sudo chef-client
[2013-11-24T18:29:21+00:00] WARN: *****************************************
[2013-11-24T18:29:21+00:00] WARN: Did not find config file: /etc/chef/client.rb, using command line options.
[2013-11-24T18:29:21+00:00] WARN: *****************************************
Starting Chef Client, version 11.8.0
Creating a new client identity for default-ubuntu-1204.vagrantup.com using the validator key.
[2013-11-24T18:29:21+00:00] WARN: Failed to read the private key /etc/chef/validation.pem: #<Errno::ENOENT: No such file or directory - /etc/chef/validation.pem>
================================================================================
Chef encountered an error attempting to create the client "default-ubuntu-1204.vagrantup.com"
================================================================================
Private Key Not Found:
----------------------
Your private key could not be loaded. If the key file exists, ensure that it is
readable by chef-client.
Relevant Config Settings:
-------------------------
validation_key "/etc/chef/validation.pem"
[2013-11-24T18:29:21+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated
[2013-11-24T18:29:21+00:00] ERROR: I cannot read /etc/chef/validation.pem, which you told me to use to sign requests!
[2013-11-24T18:29:21+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Я пытался найти способ, чтобы получить свой ключ клиента на и я предположил, что это будет через .kitchen.yml, так как это файл, который используется для создания VagrantFile. Я настроил своих других бродяг, чтобы найти мой ключ аутентификации клиента с VagrantFile, поэтому я предположил, что этот метод должен работать.
Test Kitchen рода, кажется, поддерживает бродячее положение, однако это не очень понятно, как это должно быть сделано только путем установки use_vagrant_provision: true
https://github.com/test-kitchen/kitchen-vagrant#-use_vagrant_provision
Я чувствую, что я пропускаю что-то очевидное здесь есть мне еще не пришло ...?
Не забудьте принять правильный ответ! – Robert