describe file('/etc/hypriot_release') do
  it { should_not be_file }
end

describe file('/etc/os-release') do
  it { should be_file }
  it { should be_owned_by 'root' }
  its(:content) { should contain /ID=raspbian/ }
  its(:content) { should match /HYPRIOT_OS="HypriotOS\/armhf"/ }
  its(:content) { should match /HYPRIOT_OS_VERSION="v1.0.0"/ }
  its(:content) { should match /HYPRIOT_DEVICE="Raspberry Pi"/ }
  its(:content) { should match /HYPRIOT_IMAGE_VERSION=/ }
end

describe file('/boot/os-release') do
  it { should be_file }
  it { should be_owned_by 'root' }
  its(:content) { should contain /ID=raspbian/ }
  its(:content) { should match /HYPRIOT_OS="HypriotOS\/armhf"/ }
  its(:content) { should match /HYPRIOT_OS_VERSION="v1.0.0"/ }
  its(:content) { should match /HYPRIOT_DEVICE="Raspberry Pi"/ }
  its(:content) { should match /HYPRIOT_IMAGE_VERSION=/ }
end

describe file('/etc/hypriot_release') do
  it { should_not be_file }
end

describe file('/etc/os-release') do
  it { should be_file }
  it { should be_owned_by 'root' }
  its(:content) { should contain /ID=debian/ }
  its(:content) { should match /HYPRIOT_OS="HypriotOS\/arm64"/ }
  its(:content) { should match /HYPRIOT_OS_VERSION="v1.1.1"/ }
  its(:content) { should match /HYPRIOT_DEVICE="Raspberry Pi 3 64bit"/ }
  its(:content) { should match /HYPRIOT_IMAGE_VERSION=/ }
end

describe file('/boot/os-release') do
  it { should be_file }
  it { should be_owned_by 'root' }
  its(:content) { should contain /ID=debian/ }
  its(:content) { should match /HYPRIOT_OS="HypriotOS\/arm64"/ }
  its(:content) { should match /HYPRIOT_OS_VERSION="v1.1.1"/ }
  its(:content) { should match /HYPRIOT_DEVICE="Raspberry Pi 3 64bit"/ }
  its(:content) { should match /HYPRIOT_IMAGE_VERSION=/ }
end

Fix integrations tests for release infos
Fix integrations tests for release infos

Signed-off-by: Dieter Reuter <554783fc552b5b2a46dd3d7d7b9b2cce9a82c122@me.com>
