diff options
author | Ćukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> | 2017-09-04 10:27:07 +0200 |
---|---|---|
committer | usd-importer <ubuntu-server@lists.ubuntu.com> | 2017-09-04 09:38:24 +0000 |
commit | e919bdd14e48919244da9e499070fb64377993e5 (patch) | |
tree | 33c260c7c99410ac94d5f265fc506cc0b40bb6e4 /tests/common/test_conf.py | |
parent | 70c0ea1ac879b2e1cba0a8edb1f3fbe82652413b (diff) | |
parent | 3a1d96a77ccaf023256d16183428e3d895f8a051 (diff) | |
download | vyos-walinuxagent-e919bdd14e48919244da9e499070fb64377993e5.tar.gz vyos-walinuxagent-e919bdd14e48919244da9e499070fb64377993e5.zip |
Import patches-applied version 2.2.16-0ubuntu1 to applied/ubuntu/artful-proposed
Imported using git-ubuntu import.
Changelog parent: 70c0ea1ac879b2e1cba0a8edb1f3fbe82652413b
Unapplied parent: 3a1d96a77ccaf023256d16183428e3d895f8a051
New changelog entries:
* New upstream release (LP: #1714299).
Diffstat (limited to 'tests/common/test_conf.py')
-rw-r--r-- | tests/common/test_conf.py | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/common/test_conf.py b/tests/common/test_conf.py index 1287b0d..93759de 100644 --- a/tests/common/test_conf.py +++ b/tests/common/test_conf.py @@ -24,6 +24,49 @@ from tests.tools import * class TestConf(AgentTestCase): + # Note: + # -- These values *MUST* match those from data/test_waagent.conf + EXPECTED_CONFIGURATION = { + "Provisioning.Enabled" : True, + "Provisioning.UseCloudInit" : True, + "Provisioning.DeleteRootPassword" : True, + "Provisioning.RegenerateSshHostKeyPair" : True, + "Provisioning.SshHostKeyPairType" : "rsa", + "Provisioning.MonitorHostName" : True, + "Provisioning.DecodeCustomData" : False, + "Provisioning.ExecuteCustomData" : False, + "Provisioning.PasswordCryptId" : '6', + "Provisioning.PasswordCryptSaltLength" : 10, + "Provisioning.AllowResetSysUser" : False, + "ResourceDisk.Format" : True, + "ResourceDisk.Filesystem" : "ext4", + "ResourceDisk.MountPoint" : "/mnt/resource", + "ResourceDisk.EnableSwap" : False, + "ResourceDisk.SwapSizeMB" : 0, + "ResourceDisk.MountOptions" : None, + "Logs.Verbose" : False, + "OS.EnableFIPS" : True, + "OS.RootDeviceScsiTimeout" : '300', + "OS.OpensslPath" : '/usr/bin/openssl', + "OS.SshDir" : "/notareal/path", + "HttpProxy.Host" : None, + "HttpProxy.Port" : None, + "DetectScvmmEnv" : False, + "Lib.Dir" : "/var/lib/waagent", + "DVD.MountPoint" : "/mnt/cdrom/secure", + "Pid.File" : "/var/run/waagent.pid", + "Extension.LogDir" : "/var/log/azure", + "OS.HomeDir" : "/home", + "OS.EnableRDMA" : False, + "OS.UpdateRdmaDriver" : False, + "OS.CheckRdmaDriver" : False, + "AutoUpdate.Enabled" : True, + "AutoUpdate.GAFamily" : "Prod", + "EnableOverProvisioning" : False, + "OS.AllowHTTP" : False, + "OS.EnableFirewall" : True + } + def setUp(self): AgentTestCase.setUp(self) self.conf = ConfigurationProvider() @@ -59,3 +102,11 @@ class TestConf(AgentTestCase): def test_get_provision_cloudinit(self): self.assertTrue(get_provision_cloudinit(self.conf)) + + def test_get_configuration(self): + configuration = conf.get_configuration(self.conf) + self.assertTrue(len(configuration.keys()) > 0) + for k in TestConf.EXPECTED_CONFIGURATION.keys(): + self.assertEqual( + TestConf.EXPECTED_CONFIGURATION[k], + configuration[k]) |