This repository has been archived by the owner on Aug 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from hypriot/add-device-init
WIP: Add device-init
- Loading branch information
Showing
6 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# hostname for your HypriotOS device | ||
hostname: black-pearl |
2 changes: 2 additions & 0 deletions
2
builder/test-integration/spec/hypriotos-image/base/firstboot_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require 'spec_helper' | ||
|
||
describe file('/etc/hypriot-firstboot_not_to_be_run') do | ||
it { should be_file } | ||
end |
28 changes: 28 additions & 0 deletions
28
builder/test-integration/spec/hypriotos-image/device-init_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'spec_helper' | ||
|
||
describe package('device-init') do | ||
it { should be_installed } | ||
end | ||
|
||
describe command('dpkg -l device-init') do | ||
its(:stdout) { should match /ii device-init/ } | ||
its(:stdout) { should match /0.0.14/ } | ||
its(:exit_status) { should eq 0 } | ||
end | ||
|
||
describe file('/boot/device-init.yaml') do | ||
it { should be_file } | ||
its(:content) { should match /hostname: / } | ||
end | ||
|
||
describe file('/usr/local/bin/device-init') do | ||
it { should be_file } | ||
it { should be_mode 755 } | ||
it { should be_owned_by 'root' } | ||
end | ||
|
||
# describe command('device-init --version') do | ||
# its(:stdout) { should match /0.0.14/m } | ||
# # its(:stderr) { should match /^$/ } | ||
# its(:exit_status) { should eq 0 } | ||
# end |