Browse Source

Fix kitchen tests

- Disable sudo for kitchen tests
 - No update grub on docker/lxc
 - Avoid changing hostname in docker based tests

Change-Id: Ic93ecc4680fb9a44388f494259de28ea9e8a0fc0
pull/108/head
Jakub Josef 7 years ago
parent
commit
6a87206410
6 changed files with 11 additions and 2 deletions
  1. +1
    -1
      .kitchen.yml
  2. +2
    -0
      linux/system/grub.sls
  3. +3
    -0
      linux/system/hugepages.sls
  4. +2
    -0
      linux/system/kernel.sls
  5. +2
    -0
      linux/system/sriov.sls
  6. +1
    -1
      tests/pillar/network.sls

+ 1
- 1
.kitchen.yml View File

driver: driver:
name: docker name: docker
hostname: linux.ci.local hostname: linux.ci.local
use_sudo: sudo
use_sudo: false


provisioner: provisioner:
name: salt_solo name: salt_solo

+ 2
- 0
linux/system/grub.sls View File

- mode: 755 - mode: 755
- makedirs: True - makedirs: True


{%- if grains.get('virtual_subtype', None) not in ['Docker', 'LXC'] %}
grub_update: grub_update:
cmd.wait: cmd.wait:
- name: update-grub - name: update-grub
{%- endif %}

+ 3
- 0
linux/system/hugepages.sls View File

- template: jinja - template: jinja
- require: - require:
- file: grub_d_directory - file: grub_d_directory
{%- if grains.get('virtual_subtype', None) not in ['Docker', 'LXC'] %}
- watch_in: - watch_in:
- cmd: grub_update - cmd: grub_update


{%- endif %}

{%- for hugepages_type, hugepages in system.kernel.hugepages.iteritems() %} {%- for hugepages_type, hugepages in system.kernel.hugepages.iteritems() %}


{%- if hugepages.get('mount', False) or hugepages.get('default', False) %} {%- if hugepages.get('mount', False) or hugepages.get('default', False) %}

+ 2
- 0
linux/system/kernel.sls View File

- contents: 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT isolcpus={{ system.kernel.isolcpu }}"' - contents: 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT isolcpus={{ system.kernel.isolcpu }}"'
- require: - require:
- file: grub_d_directory - file: grub_d_directory
{%- if grains.get('virtual_subtype', None) not in ['Docker', 'LXC'] %}
- watch_in: - watch_in:
- cmd: grub_update - cmd: grub_update


{%- endif %} {%- endif %}
{%- endif %}


{%- if system.kernel.version is defined %} {%- if system.kernel.version is defined %}



+ 2
- 0
linux/system/sriov.sls View File

- contents: 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT intel_iommu=on iommu=pt"' - contents: 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT intel_iommu=on iommu=pt"'
- require: - require:
- file: grub_d_directory - file: grub_d_directory
{%- if grains.get('virtual_subtype', None) not in ['Docker', 'LXC'] %}
- watch_in: - watch_in:
- cmd: grub_update - cmd: grub_update
{%- endif %}


/etc/modprobe.d/sriov.conf: /etc/modprobe.d/sriov.conf:
file.managed: file.managed:

+ 1
- 1
tests/pillar/network.sls View File

system: system:
enabled: true enabled: true
domain: ci.local domain: ci.local
name: linux
name: linux.ci.local
network: network:
enabled: true enabled: true
hostname: linux hostname: linux

Loading…
Cancel
Save