Blame SOURCES/0185-bugzilla-make-the-event-configurable.patch

4b6aa8
From 1e38476046ca0dde7d91ac07462871820cfd55ca Mon Sep 17 00:00:00 2001
4b6aa8
From: Matej Habrnal <mhabrnal@redhat.com>
4b6aa8
Date: Tue, 22 Mar 2016 14:16:40 +0100
4b6aa8
Subject: [PATCH] bugzilla: make the event configurable
4b6aa8
4b6aa8
Allow downstream to choose whether they want to open Bugzilla bugs
4b6aa8
private by default.
4b6aa8
4b6aa8
Related to rhbz#1279453
4b6aa8
4b6aa8
Signed-off-by: Jakub Filak <jfilak@redhat.com>
4b6aa8
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
4b6aa8
---
4b6aa8
 configure.ac                          |  15 +++++
4b6aa8
 po/POTFILES.skip                      |   1 +
4b6aa8
 src/plugins/Makefile.am               |   2 +-
4b6aa8
 src/plugins/bugzilla.conf             |   4 +-
4b6aa8
 src/plugins/report_Bugzilla.xml.in    |  71 ---------------------
4b6aa8
 src/plugins/report_Bugzilla.xml.in.in |  72 +++++++++++++++++++++
4b6aa8
 tests/Makefile.am                     |   8 ++-
4b6aa8
 tests/bugzilla_plugin.at.in           | 114 ++++++++++++++++++++++++++++++++++
4b6aa8
 tests/testsuite.at                    |   1 +
4b6aa8
 10 files changed, 214 insertions(+), 76 deletions(-)
4b6aa8
 delete mode 100644 src/plugins/report_Bugzilla.xml.in
4b6aa8
 create mode 100644 src/plugins/report_Bugzilla.xml.in.in
4b6aa8
 create mode 100644 tests/bugzilla_plugin.at.in
4b6aa8
4b6aa8
diff --git a/configure.ac b/configure.ac
4b6aa8
index 8aea410..a7f67c9 100644
4b6aa8
--- a/configure.ac
4b6aa8
+++ b/configure.ac
4b6aa8
@@ -95,6 +95,19 @@ AC_PATH_PROG([XMLRPC], [xmlrpc-c-config], [no])
4b6aa8
     [exit 1]
4b6aa8
 [fi]
4b6aa8
 
4b6aa8
+AC_ARG_WITH([redhatbugzillacreateprivate],
4b6aa8
+            AS_HELP_STRING([--with-redhatbugzillacreateprivate="yes/no"],
4b6aa8
+                           [Whether the Red Hat Bugzilla plugin should open
4b6aa8
+                            bugs private by default ("yes")]),
4b6aa8
+            [], [with_redhatbugzillacreateprivate="yes"])
4b6aa8
+AC_SUBST([RED_HAT_BUGZILLA_CREATE_PRIVATE], [$with_redhatbugzillacreateprivate])
4b6aa8
+
4b6aa8
+AC_ARG_WITH([redhatbugzillaprivategroups],
4b6aa8
+            AS_HELP_STRING([--with-redhatbugzillaprivategroups="CSV"],
4b6aa8
+                           [Name of groups separated by comma]),
4b6aa8
+            [], [with_redhatbugzillaprivategroups="redhat"])
4b6aa8
+AC_SUBST([RED_HAT_BUGZILLA_PRIVATE_GROUPS], [$with_redhatbugzillaprivategroups])
4b6aa8
+
4b6aa8
 XMLRPC_CFLAGS=`xmlrpc-c-config --cflags 2> /dev/null`
4b6aa8
 XMLRPC_LIBS=`xmlrpc-c-config --libs 2> /dev/null`
4b6aa8
 AC_SUBST(XMLRPC_CFLAGS)
4b6aa8
@@ -337,11 +350,13 @@ AC_CONFIG_FILES([
4b6aa8
 	src/cli/Makefile
4b6aa8
 	src/report-newt/Makefile
4b6aa8
 	src/plugins/Makefile
4b6aa8
+	src/plugins/report_Bugzilla.xml.in
4b6aa8
 	src/client-python/Makefile
4b6aa8
 	po/Makefile.in
4b6aa8
 	doc/Makefile
4b6aa8
 	doc/plugins-dbus/Makefile
4b6aa8
 	src/workflows/Makefile
4b6aa8
+	tests/bugzilla_plugin.at
4b6aa8
 ])
4b6aa8
 
4b6aa8
 #	src/plugins/Makefile
4b6aa8
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
4b6aa8
index 2048914..5268b71 100644
4b6aa8
--- a/po/POTFILES.skip
4b6aa8
+++ b/po/POTFILES.skip
4b6aa8
@@ -1,2 +1,3 @@
4b6aa8
 contrib/command-not-found/pk-tools-common.c
4b6aa8
 build/
4b6aa8
+src/plugins/report_Bugzilla.xml.in.in
4b6aa8
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
4b6aa8
index d5d75b6..397cc72 100644
4b6aa8
--- a/src/plugins/Makefile.am
4b6aa8
+++ b/src/plugins/Makefile.am
4b6aa8
@@ -82,7 +82,7 @@ dist_eventsdef_DATA = \
4b6aa8
 reporters_extra_dist =
4b6aa8
 if BUILD_BUGZILLA
4b6aa8
 dist_eventsdef_DATA += bugzilla_event.conf bugzilla_anaconda_event.conf
4b6aa8
-reporters_extra_dist += report_Bugzilla.xml.in report_Bugzilla.conf
4b6aa8
+reporters_extra_dist += report_Bugzilla.xml.in.in report_Bugzilla.conf
4b6aa8
 endif
4b6aa8
 
4b6aa8
 if BUILD_UREPORT
4b6aa8
diff --git a/src/plugins/bugzilla.conf b/src/plugins/bugzilla.conf
4b6aa8
index 29c44b3..51648de 100644
4b6aa8
--- a/src/plugins/bugzilla.conf
4b6aa8
+++ b/src/plugins/bugzilla.conf
4b6aa8
@@ -17,5 +17,5 @@ Password =
4b6aa8
 DontMatchComponents = selinux-policy
4b6aa8
 
4b6aa8
 # for more info about these settings see: https://github.com/abrt/abrt/wiki/FAQ#creating-private-bugzilla-tickets
4b6aa8
-# CreatePrivate = no
4b6aa8
-# PrivateGroups = private
4b6aa8
+# CreatePrivate = yes
4b6aa8
+# PrivateGroups = redhat
4b6aa8
diff --git a/src/plugins/report_Bugzilla.xml.in b/src/plugins/report_Bugzilla.xml.in
4b6aa8
deleted file mode 100644
4b6aa8
index 9ffe90f..0000000
4b6aa8
--- a/src/plugins/report_Bugzilla.xml.in
4b6aa8
+++ /dev/null
4b6aa8
@@ -1,71 +0,0 @@
4b6aa8
-
4b6aa8
-<event>
4b6aa8
-    <_name>Bugzilla</_name>
4b6aa8
-    <_description>Report to Bugzilla bug tracker</_description>
4b6aa8
-
4b6aa8
-    <requires-items>component,duphash,os_release</requires-items>
4b6aa8
-    <exclude-items-by-default>coredump,count,event_log,reported_to,vmcore</exclude-items-by-default>
4b6aa8
-    <exclude-items-always></exclude-items-always>
4b6aa8
-    <exclude-binary-items>no</exclude-binary-items>
4b6aa8
-    <include-items-by-default></include-items-by-default>
4b6aa8
-    <minimal-rating>3</minimal-rating>
4b6aa8
-    <gui-review-elements>yes</gui-review-elements>
4b6aa8
-
4b6aa8
-    <options>
4b6aa8
-        <option type="text" name="Bugzilla_BugzillaURL">
4b6aa8
-            <_label>Bugzilla URL</_label>
4b6aa8
-            <allow-empty>no</allow-empty>
4b6aa8
-            <_description>Address of Bugzilla server</_description>
4b6aa8
-            <default-value>https://bugzilla.redhat.com</default-value>
4b6aa8
-            <_note-html>You can create bugzilla.redhat.com account <a href="https://bugzilla.redhat.com/createaccount.cgi">here</a></_note-html>
4b6aa8
-        </option>
4b6aa8
-        <option type="text" name="Bugzilla_Login">
4b6aa8
-            <_label>User name</_label>
4b6aa8
-            <allow-empty>no</allow-empty>
4b6aa8
-            <_description>Bugzilla account user name</_description>
4b6aa8
-        </option>
4b6aa8
-        <option type="password" name="Bugzilla_Password">
4b6aa8
-            <_label>Password</_label>
4b6aa8
-            <allow-empty>no</allow-empty>
4b6aa8
-            <_description>Bugzilla account password</_description>
4b6aa8
-        </option>
4b6aa8
-        <option type="bool" name="Bugzilla_SSLVerify">
4b6aa8
-            <_label>Verify SSL</_label>
4b6aa8
-            <_description>Check SSL key validity</_description>
4b6aa8
-            <default-value>yes</default-value>
4b6aa8
-        </option>
4b6aa8
-        <option type="bool" name="Bugzilla_CreatePrivate">
4b6aa8
-            <_label>Restrict access</_label>
4b6aa8
-            <_description>Restrict access to the created bugzilla ticket allowing only users from specified groups to view it (see advanced settings for more details)</_description>
4b6aa8
-            <default-value>no</default-value>
4b6aa8
-        </option>
4b6aa8
-        <advanced-options>
4b6aa8
-            <option type="text" name="Bugzilla_Product">
4b6aa8
-                <_label>Bugzilla product</_label>
4b6aa8
-                <allow-empty>yes</allow-empty>
4b6aa8
-                <_note-html>Specify this only if you needed different product than specified in /etc/os-release</_note-html>
4b6aa8
-            </option>
4b6aa8
-            <option type="text" name="Bugzilla_ProductVersion">
4b6aa8
-                <_label>Bugzilla product version</_label>
4b6aa8
-                <allow-empty>yes</allow-empty>
4b6aa8
-                <_note-html>Specify this only if you needed different product version than specified in /etc/os-release</_note-html>
4b6aa8
-            </option>
4b6aa8
-            <option type="text" name="http_proxy">
4b6aa8
-                <_label>HTTP Proxy</_label>
4b6aa8
-                <allow-empty>yes</allow-empty>
4b6aa8
-                <_note-html>Sets the proxy server to use for HTTP</_note-html>
4b6aa8
-            </option>
4b6aa8
-            <option type="text" name="HTTPS_PROXY">
4b6aa8
-                <_label>HTTPS Proxy</_label>
4b6aa8
-                <allow-empty>yes</allow-empty>
4b6aa8
-                <_note-html>Sets the proxy server to use for HTTPS</_note-html>
4b6aa8
-            </option>
4b6aa8
-            <option type="text" name="Bugzilla_PrivateGroups">
4b6aa8
-                <_label>Groups</_label>
4b6aa8
-                <allow-empty>yes</allow-empty>
4b6aa8
-                <default-value>private</default-value>
4b6aa8
-                <_note-html>Restrict the access to specified groups <a href="https://github.com/abrt/abrt/wiki/FAQ#creating-private-bugzilla-tickets">?</a></_note-html>
4b6aa8
-            </option>
4b6aa8
-        </advanced-options>
4b6aa8
-    </options>
4b6aa8
-</event>
4b6aa8
diff --git a/src/plugins/report_Bugzilla.xml.in.in b/src/plugins/report_Bugzilla.xml.in.in
4b6aa8
new file mode 100644
4b6aa8
index 0000000..5ef3925
4b6aa8
--- /dev/null
4b6aa8
+++ b/src/plugins/report_Bugzilla.xml.in.in
4b6aa8
@@ -0,0 +1,72 @@
4b6aa8
+
4b6aa8
+<event>
4b6aa8
+    <_name>Bugzilla</_name>
4b6aa8
+    <_description>Report to Bugzilla bug tracker</_description>
4b6aa8
+
4b6aa8
+    <requires-items>component,duphash,os_release</requires-items>
4b6aa8
+    <exclude-items-by-default>coredump,count,event_log,reported_to,vmcore</exclude-items-by-default>
4b6aa8
+    <exclude-items-always></exclude-items-always>
4b6aa8
+    <exclude-binary-items>no</exclude-binary-items>
4b6aa8
+    <include-items-by-default></include-items-by-default>
4b6aa8
+    <minimal-rating>3</minimal-rating>
4b6aa8
+    <gui-review-elements>yes</gui-review-elements>
4b6aa8
+    <support-restricted-access optionname="Bugzilla_CreatePrivate">yes</support-restricted-access>
4b6aa8
+
4b6aa8
+    <options>
4b6aa8
+        <option type="text" name="Bugzilla_Login">
4b6aa8
+            <_label>User name</_label>
4b6aa8
+            <allow-empty>no</allow-empty>
4b6aa8
+            <_description>Bugzilla account user name</_description>
4b6aa8
+            <_note-html>You can create bugzilla.redhat.com account <a href="https://bugzilla.redhat.com/createaccount.cgi">here</a></_note-html>
4b6aa8
+        </option>
4b6aa8
+        <option type="password" name="Bugzilla_Password">
4b6aa8
+            <_label>Password</_label>
4b6aa8
+            <allow-empty>no</allow-empty>
4b6aa8
+            <_description>Bugzilla account password</_description>
4b6aa8
+        </option>
4b6aa8
+        <option type="bool" name="Bugzilla_CreatePrivate">
4b6aa8
+            <_label>Restrict access</_label>
4b6aa8
+            <_note-html>Restrict access to the created bugzilla ticket allowing only users from specified groups to view it (see advanced settings for more details)</_note-html>
4b6aa8
+            <default-value>@RED_HAT_BUGZILLA_CREATE_PRIVATE@</default-value>
4b6aa8
+        </option>
4b6aa8
+        <advanced-options>
4b6aa8
+            <option type="text" name="Bugzilla_PrivateGroups">
4b6aa8
+                <_label>Groups</_label>
4b6aa8
+                <allow-empty>yes</allow-empty>
4b6aa8
+                <default-value>@RED_HAT_BUGZILLA_PRIVATE_GROUPS@</default-value>
4b6aa8
+                <_note-html>Restrict the access to specified groups <a href="https://github.com/abrt/abrt/wiki/FAQ#creating-private-bugzilla-tickets">?</a></_note-html>
4b6aa8
+            </option>
4b6aa8
+            <option type="text" name="Bugzilla_BugzillaURL">
4b6aa8
+                <_label>Bugzilla URL</_label>
4b6aa8
+                <allow-empty>no</allow-empty>
4b6aa8
+                <default-value>https://bugzilla.redhat.com</default-value>
4b6aa8
+                <_note-html>Address of Bugzilla server</_note-html>
4b6aa8
+            </option>
4b6aa8
+            <option type="bool" name="Bugzilla_SSLVerify">
4b6aa8
+                <_label>Verify SSL</_label>
4b6aa8
+                <_note-html>Check SSL key validity</_note-html>
4b6aa8
+                <default-value>yes</default-value>
4b6aa8
+            </option>
4b6aa8
+            <option type="text" name="Bugzilla_Product">
4b6aa8
+                <_label>Bugzilla product</_label>
4b6aa8
+                <allow-empty>yes</allow-empty>
4b6aa8
+                <_note-html>Specify this only if you needed different product than specified in /etc/os-release</_note-html>
4b6aa8
+            </option>
4b6aa8
+            <option type="text" name="Bugzilla_ProductVersion">
4b6aa8
+                <_label>Bugzilla product version</_label>
4b6aa8
+                <allow-empty>yes</allow-empty>
4b6aa8
+                <_note-html>Specify this only if you needed different product version than specified in /etc/os-release</_note-html>
4b6aa8
+            </option>
4b6aa8
+            <option type="text" name="http_proxy">
4b6aa8
+                <_label>HTTP Proxy</_label>
4b6aa8
+                <allow-empty>yes</allow-empty>
4b6aa8
+                <_note-html>Sets the proxy server to use for HTTP</_note-html>
4b6aa8
+            </option>
4b6aa8
+            <option type="text" name="HTTPS_PROXY">
4b6aa8
+                <_label>HTTPS Proxy</_label>
4b6aa8
+                <allow-empty>yes</allow-empty>
4b6aa8
+                <_note-html>Sets the proxy server to use for HTTPS</_note-html>
4b6aa8
+            </option>
4b6aa8
+        </advanced-options>
4b6aa8
+    </options>
4b6aa8
+</event>
4b6aa8
diff --git a/tests/Makefile.am b/tests/Makefile.am
4b6aa8
index c22958b..825a870 100644
4b6aa8
--- a/tests/Makefile.am
4b6aa8
+++ b/tests/Makefile.am
4b6aa8
@@ -48,12 +48,16 @@ TESTSUITE_AT = \
4b6aa8
   iso_date.at \
4b6aa8
   uriparser.at
4b6aa8
 
4b6aa8
+TESTSUITE_AT_IN = \
4b6aa8
+  bugzilla_plugin.at
4b6aa8
+
4b6aa8
 EXTRA_DIST += $(TESTSUITE_AT)
4b6aa8
 TESTSUITE = $(srcdir)/testsuite
4b6aa8
 MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
4b6aa8
 check_DATA = atconfig atlocal $(TESTSUITE)
4b6aa8
 DISTCLEANFILES = atconfig
4b6aa8
-EXTRA_DIST += atlocal.in conf ureport ureport-rhts-credentials
4b6aa8
+EXTRA_DIST += atlocal.in conf ureport ureport-rhts-credentials \
4b6aa8
+              bugzilla_plugin.at.in
4b6aa8
 
4b6aa8
 atconfig: $(top_builddir)/config.status
4b6aa8
 	(cd ${top_builddir} && ./config.status ${subdir}/atconfig)
4b6aa8
@@ -69,6 +73,6 @@ clean-local:
4b6aa8
 	test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' --clean
4b6aa8
 
4b6aa8
 AUTOTEST = $(AUTOM4TE) --language=autotest
4b6aa8
-$(TESTSUITE): $(TESTSUITE_AT) $(srcdir)/package.m4
4b6aa8
+$(TESTSUITE): $(TESTSUITE_AT) $(TESTSUITE_AT_IN) $(srcdir)/package.m4
4b6aa8
 	$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
4b6aa8
 	mv $@.tmp $@
4b6aa8
diff --git a/tests/bugzilla_plugin.at.in b/tests/bugzilla_plugin.at.in
4b6aa8
new file mode 100644
4b6aa8
index 0000000..a06b9d3
4b6aa8
--- /dev/null
4b6aa8
+++ b/tests/bugzilla_plugin.at.in
4b6aa8
@@ -0,0 +1,114 @@
4b6aa8
+# -*- Autotest -*-
4b6aa8
+
4b6aa8
+AT_BANNER([Bugzilla])
4b6aa8
+
4b6aa8
+## ------------------- ##
4b6aa8
+## report_Bugzilla_xml ##
4b6aa8
+## ------------------- ##
4b6aa8
+
4b6aa8
+AT_TESTFUN([report_Bugzilla_xml],
4b6aa8
+[[
4b6aa8
+#include "testsuite.h"
4b6aa8
+
4b6aa8
+TS_MAIN
4b6aa8
+{
4b6aa8
+    event_config_t *conf = new_event_config("report_Bugzilla");
4b6aa8
+    load_event_description_from_file(conf, "../../../src/plugins/report_Bugzilla.xml");
4b6aa8
+
4b6aa8
+    TS_ASSERT_STRING_EQ(ec_get_screen_name(conf), "Bugzilla", "Screen name");
4b6aa8
+    TS_ASSERT_STRING_EQ(ec_get_description(conf), "Report to Bugzilla bug tracker", "Description");
4b6aa8
+
4b6aa8
+    TS_ASSERT_STRING_EQ(conf->ec_creates_items, NULL, "Not-defined create items");
4b6aa8
+
4b6aa8
+    TS_ASSERT_STRING_EQ(conf->ec_requires_items, "component,duphash,os_release", "Correct required items");
4b6aa8
+
4b6aa8
+    TS_ASSERT_STRING_EQ(conf->ec_exclude_items_by_default, "coredump,count,event_log,reported_to,vmcore", "Correct excluded items by default");
4b6aa8
+
4b6aa8
+    TS_ASSERT_STRING_EQ(conf->ec_exclude_items_always, NULL, "Not-defined excluded items always");
4b6aa8
+
4b6aa8
+    TS_ASSERT_FALSE(conf->ec_exclude_binary_items);
4b6aa8
+
4b6aa8
+    TS_ASSERT_STRING_EQ(conf->ec_include_items_by_default, NULL, "Not-defined included items by default");
4b6aa8
+
4b6aa8
+    TS_ASSERT_SIGNED_EQ(conf->ec_minimal_rating, 3);
4b6aa8
+
4b6aa8
+    TS_ASSERT_FALSE(conf->ec_skip_review);
4b6aa8
+
4b6aa8
+    TS_ASSERT_FALSE(conf->ec_sending_sensitive_data);
4b6aa8
+
4b6aa8
+    TS_ASSERT_TRUE(conf->ec_supports_restricted_access);
4b6aa8
+
4b6aa8
+    event_option_t options[10] = {
4b6aa8
+        { .eo_value = NULL, .eo_label = (char *)"User name",
4b6aa8
+          .eo_note_html = (char *)"You can create bugzilla.redhat.com account here",
4b6aa8
+          .eo_type = OPTION_TYPE_TEXT, .eo_allow_empty = 0, .is_advanced = 0,
4b6aa8
+        },
4b6aa8
+        { .eo_value = NULL, .eo_label = (char *)"Password", .eo_note_html = NULL,
4b6aa8
+          .eo_type = OPTION_TYPE_PASSWORD, .eo_allow_empty = 0, .is_advanced = 0,
4b6aa8
+        },
4b6aa8
+        { .eo_value = (char *)"@RED_HAT_BUGZILLA_CREATE_PRIVATE@", .eo_label = (char *)"Restrict access",
4b6aa8
+          .eo_note_html = (char *)"Restrict access to the created bugzilla ticket allowing only users from specified groups to view it (see advanced settings for more details)",
4b6aa8
+          .eo_type = OPTION_TYPE_BOOL, .eo_allow_empty = 0, .is_advanced = 0,
4b6aa8
+        },
4b6aa8
+        { .eo_value = (char *)"@RED_HAT_BUGZILLA_PRIVATE_GROUPS@", .eo_label = (char *)"Groups",
4b6aa8
+          .eo_note_html = (char *)"Restrict the access to specified groups ?",
4b6aa8
+          .eo_type = OPTION_TYPE_TEXT, .eo_allow_empty = 1, .is_advanced = 1,
4b6aa8
+        },
4b6aa8
+        { .eo_value = (char *)"https://bugzilla.redhat.com", .eo_label = (char *)"Bugzilla URL",
4b6aa8
+          .eo_note_html = (char *)"Address of Bugzilla server",
4b6aa8
+          .eo_type = OPTION_TYPE_TEXT, .eo_allow_empty = 0, .is_advanced = 1,
4b6aa8
+        },
4b6aa8
+        { .eo_value = (char *)"yes", .eo_label = (char *)"Verify SSL",
4b6aa8
+          .eo_note_html = (char *)"Check SSL key validity",
4b6aa8
+          .eo_type = OPTION_TYPE_BOOL, .eo_allow_empty = 0, .is_advanced = 1,
4b6aa8
+        },
4b6aa8
+        { .eo_value = NULL, .eo_label = (char *)"Bugzilla product",
4b6aa8
+          .eo_note_html = (char *)"Specify this only if you needed different product than specified in /etc/os-release",
4b6aa8
+          .eo_type = OPTION_TYPE_TEXT, .eo_allow_empty = 1, .is_advanced = 1,
4b6aa8
+        },
4b6aa8
+        { .eo_value = NULL, .eo_label = (char *)"Bugzilla product version",
4b6aa8
+          .eo_note_html = (char *)"Specify this only if you needed different product version than specified in /etc/os-release",
4b6aa8
+          .eo_type = OPTION_TYPE_TEXT, .eo_allow_empty = 1, .is_advanced = 1,
4b6aa8
+        },
4b6aa8
+        { .eo_value = NULL, .eo_label = (char *)"HTTP Proxy",
4b6aa8
+          .eo_note_html = (char *)"Sets the proxy server to use for HTTP",
4b6aa8
+          .eo_type = OPTION_TYPE_TEXT, .eo_allow_empty = 1, .is_advanced = 1,
4b6aa8
+        },
4b6aa8
+        { .eo_value = NULL, .eo_label = (char *)"HTTPS Proxy",
4b6aa8
+          .eo_note_html = (char *)"Sets the proxy server to use for HTTPS",
4b6aa8
+          .eo_type = OPTION_TYPE_TEXT, .eo_allow_empty = 1, .is_advanced = 1,
4b6aa8
+        },
4b6aa8
+    };
4b6aa8
+
4b6aa8
+    const char *option_names[] = {
4b6aa8
+        "Bugzilla_Login",
4b6aa8
+        "Bugzilla_Password",
4b6aa8
+        "Bugzilla_CreatePrivate",
4b6aa8
+        "Bugzilla_PrivateGroups",
4b6aa8
+        "Bugzilla_BugzillaURL",
4b6aa8
+        "Bugzilla_SSLVerify",
4b6aa8
+        "Bugzilla_Product",
4b6aa8
+        "Bugzilla_ProductVersion",
4b6aa8
+        "http_proxy",
4b6aa8
+        "HTTPS_PROXY"
4b6aa8
+    };
4b6aa8
+
4b6aa8
+    for (unsigned i = 0; i < ARRAY_SIZE(option_names); ++i) {
4b6aa8
+        event_option_t *eo = get_event_option_from_list(option_names[i], conf->options);
4b6aa8
+        TS_ASSERT_PTR_IS_NOT_NULL_MESSAGE(eo, option_names[i]);
4b6aa8
+
4b6aa8
+        if (eo == NULL)
4b6aa8
+            continue;
4b6aa8
+
4b6aa8
+        TS_ASSERT_STRING_EQ(eo->eo_value, options[i].eo_value, option_names[i]);
4b6aa8
+        TS_ASSERT_STRING_EQ(eo->eo_label, options[i].eo_label, option_names[i]);
4b6aa8
+        TS_ASSERT_STRING_EQ(eo->eo_note_html, options[i].eo_note_html, option_names[i]);
4b6aa8
+        TS_ASSERT_SIGNED_OP_MESSAGE(eo->eo_type, ==, options[i].eo_type, option_names[i]);
4b6aa8
+        TS_ASSERT_SIGNED_OP_MESSAGE(eo->eo_allow_empty, ==, options[i].eo_allow_empty, option_names[i]);
4b6aa8
+        TS_ASSERT_SIGNED_OP_MESSAGE(eo->is_advanced, ==, options[i].is_advanced, option_names[i]);
4b6aa8
+    }
4b6aa8
+
4b6aa8
+    free_event_config(conf);
4b6aa8
+}
4b6aa8
+TS_RETURN_MAIN
4b6aa8
+]])
4b6aa8
diff --git a/tests/testsuite.at b/tests/testsuite.at
4b6aa8
index 72e0715..c8269b1 100644
4b6aa8
--- a/tests/testsuite.at
4b6aa8
+++ b/tests/testsuite.at
4b6aa8
@@ -21,3 +21,4 @@ m4_include([dump_dir.at])
4b6aa8
 m4_include([global_config.at])
4b6aa8
 m4_include([iso_date.at])
4b6aa8
 m4_include([uriparser.at])
4b6aa8
+m4_include([bugzilla_plugin.at])
4b6aa8
-- 
4b6aa8
1.8.3.1
4b6aa8