~cjwatson/rabbitfixture/fix-esrch-handling

« back to all changes in this revision

Viewing changes to rabbitfixture/server.py

  • Committer: Free Ekanayaka
  • Date: 2016-09-05 09:38:34 UTC
  • mfrom: (36.1.1 disable-plugins)
  • Revision ID: free.ekanayaka@canonical.com-20160905093834-m30f9im4gc9ppp4f
Export the RABBITMQ_ENABLED_PLUGINS_FILE environment
variable and make it point to /dev/null by default.

This matches the default value of RABBITMQ_PLUGINS_DIR, which
is currently an empty temporary directory, and prevents
the fixture from failing if the system-wide rabbitmq configuration
has plugins enabled.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
        if self.nodename is None:
140
140
            self.nodename = os.path.basename(self.useFixture(TempDir()).path)
141
141
        self.pluginsdir = self.useFixture(TempDir()).path
 
142
        self.pluginsfile = os.devnull
142
143
 
143
144
    @property
144
145
    def fq_nodename(self):
158
159
    - ``RABBITMQ_DIST_PORT``
159
160
    - ``RABBITMQ_NODENAME``
160
161
    - ``RABBITMQ_PLUGINS_DIR``
 
162
    - ``RABBITMQ_ENABLED_PLUGINS_FILE``
161
163
 
162
164
    """
163
165
 
187
189
            "RABBITMQ_NODENAME", self.config.fq_nodename))
188
190
        self.useFixture(EnvironmentVariableFixture(
189
191
            "RABBITMQ_PLUGINS_DIR", self.config.pluginsdir))
 
192
        self.useFixture(EnvironmentVariableFixture(
 
193
            "RABBITMQ_ENABLED_PLUGINS_FILE", self.config.pluginsfile))
190
194
        self._errors = []
191
195
        self.addDetail('rabbit-errors', Content(
192
196
            UTF8_TEXT, self._get_errors))