~tribaal/landscape-client/isolate-lxc-container-tests

« back to all changes in this revision

Viewing changes to landscape/monitor/tests/test_config.py

  • Committer: Tarmac
  • Author(s): Adam Collard
  • Date: 2013-09-25 14:29:50 UTC
  • mfrom: (726.2.6 juju-message-type)
  • Revision ID: tarmac-20130925142950-ezn9c7vhs1kqs4aw
Merge juju-message-type [f=1226863] [r=tribaal,free.ekanayaka] [a=Adam Collard]
Add JujuInfo plugin and associated juju-info message.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import os.path
 
2
 
1
3
from landscape.tests.helpers import LandscapeTest
2
4
from landscape.monitor.config import MonitorConfiguration, ALL_PLUGINS
3
5
 
20
22
        which plugins should be active.
21
23
        """
22
24
        self.config.load(["--monitor-plugins", "  ComputerInfo, LoadAverage "])
23
 
        self.assertEqual(self.config.plugin_factories, ["ComputerInfo",
24
 
                                                        "LoadAverage"])
 
25
        self.assertEqual(
 
26
            self.config.plugin_factories, ["ComputerInfo", "LoadAverage"])
25
27
 
26
28
    def test_flush_interval(self):
27
29
        """
30
32
        """
31
33
        self.config.load(["--flush-interval", "123"])
32
34
        self.assertEqual(self.config.flush_interval, 123)
 
35
 
 
36
    def test_juju_filename(self):
 
37
        """
 
38
        Can get path to juju JSON file from config.
 
39
        """
 
40
        self.config.data_path = self.makeDir()
 
41
        self.assertEqual(self.config.juju_filename, os.path.join(
 
42
                self.config.data_path, "juju-info.json"))
 
43