mirror of
https://github.com/rancher/os.git
synced 2025-09-17 23:48:09 +00:00
Add sysctl support in cloud config
This commit is contained in:
7
tests/integration/assets/test_20/cloud-config.yml
Normal file
7
tests/integration/assets/test_20/cloud-config.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
#cloud-config
|
||||
rancher:
|
||||
sysctl:
|
||||
kernel.domainname: test
|
||||
dev.cdrom.debug: 1
|
||||
ssh_authorized_keys:
|
||||
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC85w9stZyiLQp/DkVO6fqwiShYcj1ClKdtCqgHtf+PLpJkFReSFu8y21y+ev09gsSMRRrjF7yt0pUHV6zncQhVeqsZtgc5WbELY2DOYUGmRn/CCvPbXovoBrQjSorqlBmpuPwsStYLr92Xn+VVsMNSUIegHY22DphGbDKG85vrKB8HxUxGIDxFBds/uE8FhSy+xsoyT/jUZDK6pgq2HnGl6D81ViIlKecpOpWlW3B+fea99ADNyZNVvDzbHE5pcI3VRw8u59WmpWOUgT6qacNVACl8GqpBvQk8sw7O/X9DSZHCKafeD9G5k+GYbAUz92fKWrx/lOXfUXPS3+c8dRIF
|
17
tests/integration/rostest/test_20_sysctl.py
Normal file
17
tests/integration/rostest/test_20_sysctl.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import pytest
|
||||
import rostest.util as u
|
||||
from rostest.util import SSH
|
||||
|
||||
cloud_config_path = './tests/integration/assets/test_20/cloud-config.yml'
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def qemu(request):
|
||||
q = u.run_qemu(request, run_args=['--cloud-config', cloud_config_path])
|
||||
u.flush_out(q.stdout)
|
||||
return q
|
||||
|
||||
|
||||
def test_sysctl(qemu):
|
||||
SSH(qemu).check_call("sudo cat /proc/sys/kernel/domainname | grep test")
|
||||
SSH(qemu).check_call("sudo cat /proc/sys/dev/cdrom/debug | grep 1")
|
Reference in New Issue
Block a user