Closed lordievader closed 4 years ago
Hi @lordievader, thanks for the PR!
can you please add a test that verifies the Environment=...
line is correct?
Hi @bastelfreak. What would be a good way to test this? I didn't see a testing framework that is used in this project.
Hi @lordievader, this module uses rspec-puppet: https://github.com/voxpupuli/puppet-homeassistant/blob/master/spec/classes/init_spec.rb
if you've questions about it it might be a good idea to join our IRC channel #voxpupuli on freenode or our slack at https://slack.puppet.com/. That probably makes it easier to discuss the test setup.
@bastelfreak With some help from @alexjfisher on IRC I was able to run the rspec-puppet. I've added a line to the init_spec.rb to check the Environment. Is this sufficient?
@lordievader Thanks for adding a test. I don't know that much about homeassistant, but given your detailed explanation, this does look correct to me. Thanks!
Pull Request (PR) description
Systemd doesn't do variable expansion in its unit definition. From the
systemd.exec
man page:Effectively this breaks finding of binaries if Home Assistant is set up with this module. (In my case demonstrated by the
wake-on-lan
component not being able to findping
.)So I propose to replace '$VIRTUAL_ENV' with '<%= @home %>'. And '$PATH' with the PATH variable from /etc/profile (in this PR it is from Raspbian).
This Pull Request (PR) fixes the following issues
I did not make an issue for this PR. There is no open issue describing the same.