Browse Source

add set_local_raw_multiline test

setlc_raw can be used to set several lines at once. The test checks that
it works as expected. See I565f5420743fbd95e9d744010c488953c54dd8a4
for some context of why that is useful.

Change-Id: I21bd78fa6169002a70fa9074d56d985bfc0b833f
Mikhail S Medvedev 2 years ago
parent
commit
ae73f278a1
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      devstack/tests/test_localconf_set_local.py

+ 8
- 0
devstack/tests/test_localconf_set_local.py View File

@@ -109,3 +109,11 @@ class TestLcSet(testtools.TestCase):
109 109
         with open(self._path) as f:
110 110
             content = f.read()
111 111
             self.assertEqual(content, RESULT3)
112
+
113
+    def test_set_raw_multiline(self):
114
+        conf = dsconf.LocalConf(self._path)
115
+        conf.set_local("enable_plugin foo http://foo branch"
116
+                       "\nenable_plugin bar http://foo branch")
117
+        with open(self._path) as f:
118
+            content = f.read()
119
+            self.assertEqual(content, RESULT3)

Loading…
Cancel
Save