summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocker/generate_bmo_data.pl5
-rw-r--r--qa/config/generate_test_data.pl6
-rw-r--r--qa/t/test_bmo_enter_new_bug.t1
-rw-r--r--qa/t/test_default_groups.t3
-rw-r--r--qa/t/test_edit_products_properties.t1
-rw-r--r--qa/t/test_votes.t1
6 files changed, 13 insertions, 4 deletions
diff --git a/docker/generate_bmo_data.pl b/docker/generate_bmo_data.pl
index 84b0f0bf8..c58b5746f 100755
--- a/docker/generate_bmo_data.pl
+++ b/docker/generate_bmo_data.pl
@@ -388,7 +388,10 @@ foreach my $group (@groups) {
# Update default security group settings for new products
my $default_security_group = Bugzilla::Group->new({ name => 'core-security' });
-$dbh->do('UPDATE products SET security_group_id = ?', undef, $default_security_group->id);
+if ($default_security_group) {
+ $dbh->do('UPDATE products SET security_group_id = ? WHERE security_group_id IS NULL',
+ undef, $default_security_group->id);
+}
##########################################################################
# Set Parameters
diff --git a/qa/config/generate_test_data.pl b/qa/config/generate_test_data.pl
index 4891d30bc..824464967 100644
--- a/qa/config/generate_test_data.pl
+++ b/qa/config/generate_test_data.pl
@@ -566,9 +566,9 @@ $dbh->do('INSERT INTO group_group_map VALUES (?, ?, 0)',
# BMO: Update default security group settings for new products
my $default_security_group = Bugzilla::Group->new({ name => 'core-security' });
$default_security_group ||= Bugzilla::Group->new({ name => 'Master' });
-foreach my $product (@products) {
- $dbh->do('UPDATE products SET security_group_id = ? WHERE name = ?',
- undef, $default_security_group->id, $product->{product_name});
+if ($default_security_group) {
+ $dbh->do('UPDATE products SET security_group_id = ? WHERE security_group_id IS NULL',
+ undef, $default_security_group->id);
}
##########################################################################
diff --git a/qa/t/test_bmo_enter_new_bug.t b/qa/t/test_bmo_enter_new_bug.t
index ac4a9ca8b..e029cbfee 100644
--- a/qa/t/test_bmo_enter_new_bug.t
+++ b/qa/t/test_bmo_enter_new_bug.t
@@ -270,6 +270,7 @@ sub _check_product {
$sel->type_ok("product", $product);
$sel->type_ok("description", $product_description);
$sel->type_ok("version", $version) if $version;
+ $sel->select_ok("security_group_id", "label=core-security");
$sel->select_ok("default_op_sys_id", "Unspecified");
$sel->select_ok("default_platform_id", "Unspecified");
$sel->click_ok('//input[@type="submit" and @value="Add"]');
diff --git a/qa/t/test_default_groups.t b/qa/t/test_default_groups.t
index 9875bc847..974898dac 100644
--- a/qa/t/test_default_groups.t
+++ b/qa/t/test_default_groups.t
@@ -23,6 +23,7 @@ set_parameters($sel, { "Group Security" => {"makeproductgroups-on" => undef} });
add_product($sel);
$sel->type_ok("product", "ready_to_die");
$sel->type_ok("description", "will die");
+$sel->select_ok("security_group_id", "label=core-security");
$sel->select_ok("default_op_sys_id", "Unspecified");
$sel->select_ok("default_platform_id", "Unspecified");
$sel->click_ok('//input[@value="Add"]');
@@ -81,6 +82,7 @@ $sel->is_text_present_ok("Access to bugs in the ready_to_die product");
add_product($sel);
$sel->type_ok("product", "ready_to_die");
$sel->type_ok("description", "will die");
+$sel->select_ok("security_group_id", "label=core-security");
$sel->select_ok("default_op_sys_id", "Unspecified");
$sel->select_ok("default_platform_id", "Unspecified");
$sel->click_ok('//input[@value="Add"]');
@@ -164,6 +166,7 @@ set_parameters($sel, { "Group Security" => {"makeproductgroups-off" => undef} })
add_product($sel);
$sel->type_ok("product", "ready_to_die");
$sel->type_ok("description", "will die");
+$sel->select_ok("security_group_id", "label=core-security");
$sel->select_ok("default_op_sys_id", "Unspecified");
$sel->select_ok("default_platform_id", "Unspecified");
$sel->click_ok('//input[@value="Add"]');
diff --git a/qa/t/test_edit_products_properties.t b/qa/t/test_edit_products_properties.t
index 7b3eabc19..417fa4be6 100644
--- a/qa/t/test_edit_products_properties.t
+++ b/qa/t/test_edit_products_properties.t
@@ -59,6 +59,7 @@ if ($config->{test_extensions}) {
$sel->type_ok("votestoconfirm", "10");
}
$sel->type_ok("version", "0.1a");
+$sel->select_ok("security_group_id", "label=core-security");
$sel->select_ok("default_op_sys_id", "Unspecified");
$sel->select_ok("default_platform_id", "Unspecified");
$sel->click_ok('//input[@type="submit" and @value="Add"]');
diff --git a/qa/t/test_votes.t b/qa/t/test_votes.t
index 99b191c80..b36491b60 100644
--- a/qa/t/test_votes.t
+++ b/qa/t/test_votes.t
@@ -33,6 +33,7 @@ $sel->type_ok("description", "A great new product");
$sel->type_ok("votesperuser", 10);
$sel->type_ok("maxvotesperbug", 5);
$sel->type_ok("votestoconfirm", 3);
+$sel->select_ok("security_group_id", "label=core-security");
$sel->select_ok("default_op_sys_id", "Unspecified");
$sel->select_ok("default_platform_id", "Unspecified");
$sel->click_ok('//input[@type="submit" and @value="Add"]');