You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ne...@apache.org on 2017/05/02 15:44:46 UTC
[1/4] incubator-trafficcontrol git commit: use DBIx methods to get
list of tables to delete; use truncate instead of delete_all
Repository: incubator-trafficcontrol
Updated Branches:
refs/heads/master 80c8a8bba -> 69b7cc4d8
use DBIx methods to get list of tables to delete; use truncate instead of delete_all
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/36796c4b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/36796c4b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/36796c4b
Branch: refs/heads/master
Commit: 36796c4b30bd0384938e9bc31a52a4855ba91ed2
Parents: f3c8618
Author: Dan Kirkwood <da...@gmail.com>
Authored: Thu Apr 27 22:16:11 2017 +0000
Committer: David Neuman <da...@gmail.com>
Committed: Tue May 2 09:43:49 2017 -0600
----------------------------------------------------------------------
.../app/lib/Test/IntegrationTestHelper.pm | 48 +++++++-------------
1 file changed, 16 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/36796c4b/traffic_ops/app/lib/Test/IntegrationTestHelper.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Test/IntegrationTestHelper.pm b/traffic_ops/app/lib/Test/IntegrationTestHelper.pm
index 1abf9d2..59667a3 100644
--- a/traffic_ops/app/lib/Test/IntegrationTestHelper.pm
+++ b/traffic_ops/app/lib/Test/IntegrationTestHelper.pm
@@ -157,42 +157,26 @@ sub load_core_data {
diag "Done!";
}
-# Tearing down the Cachegroup table requires deleting them in a specific order, because
-# of the 'parent_cachegroup_id' and nested references.
-sub delete_cachegroups {
+sub unload_core_data {
my $self = shift;
+ my $schema = shift;
my $dbh = Schema->database_handle;
- my $cg = $dbh->prepare("TRUNCATE TABLE cachegroup CASCADE;");
- $cg->execute();
- $cg->finish();
- $dbh->disconnect;
-}
-sub unload_core_data {
- my $self = shift;
- my $schema = shift;
- $self->teardown( $schema, 'Job' );
- $self->teardown( $schema, 'Log' );
- $self->teardown( $schema, 'TmUser' );
- $self->teardown( $schema, 'Role' );
- $self->teardown( $schema, 'Regex' );
- $self->teardown( $schema, 'DeliveryserviceServer' );
- $self->teardown( $schema, 'Deliveryservice' );
- $self->teardown( $schema, 'Server' );
- $self->teardown( $schema, 'Asn' );
- $self->delete_cachegroups($schema); # cachegroups is special because it refs itself
- $self->teardown( $schema, 'Profile' );
- $self->teardown( $schema, 'Parameter' );
- $self->teardown( $schema, 'ProfileParameter' );
- $self->teardown( $schema, 'ToExtension' );
- $self->teardown( $schema, 'Type' );
- $self->teardown( $schema, 'Status' );
- $self->teardown( $schema, 'PhysLocation' );
- $self->teardown( $schema, 'Region' );
- $self->teardown( $schema, 'Division' );
- $self->teardown( $schema, 'Snapshot' );
- $self->teardown( $schema, 'Cdn' );
+ # Suppress NOTICE messages for cascades
+ my $nonotice = $dbh->prepare("SET client_min_messages TO WARNING;");
+ $nonotice->execute();
+ $nonotice->finish();
+ for my $source (values $schema->source_registrations) {
+ if ( ! $source->isa('DBIx::Class::ResultSource::Table') ) {
+ # Skip if it doesn't represent an actual table
+ next;
+ }
+ my $table_name = $source->name;
+ my $truncate = $dbh->prepare("TRUNCATE TABLE $table_name CASCADE;");
+ $truncate->execute();
+ $truncate->finish();
+ }
}
1;
[3/4] incubator-trafficcontrol git commit: removes unused schema files
Posted by ne...@apache.org.
removes unused schema files
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/c8bbc658
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/c8bbc658
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/c8bbc658
Branch: refs/heads/master
Commit: c8bbc658b7668d0b9c4617d03b6302db0f6ca6e6
Parents: 80c8a8b
Author: Dan Kirkwood <da...@gmail.com>
Authored: Thu Apr 27 21:56:22 2017 +0000
Committer: David Neuman <da...@gmail.com>
Committed: Tue May 2 09:43:49 2017 -0600
----------------------------------------------------------------------
.../lib/Schema/Result/DeliveryserviceExtuser.pm | 144 -------------
traffic_ops/app/lib/Schema/Result/Staticdn.pm | 205 -------------------
2 files changed, 349 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c8bbc658/traffic_ops/app/lib/Schema/Result/DeliveryserviceExtuser.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Schema/Result/DeliveryserviceExtuser.pm b/traffic_ops/app/lib/Schema/Result/DeliveryserviceExtuser.pm
deleted file mode 100644
index 4d703c3..0000000
--- a/traffic_ops/app/lib/Schema/Result/DeliveryserviceExtuser.pm
+++ /dev/null
@@ -1,144 +0,0 @@
-use utf8;
-#
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-package Schema::Result::DeliveryserviceExtuser;
-
-# Created by DBIx::Class::Schema::Loader
-# DO NOT MODIFY THE FIRST PART OF THIS FILE
-
-=head1 NAME
-
-Schema::Result::DeliveryserviceExtuser
-
-=cut
-
-use strict;
-use warnings;
-
-use base 'DBIx::Class::Core';
-
-=head1 TABLE: C<deliveryservice_extuser>
-
-=cut
-
-__PACKAGE__->table("deliveryservice_extuser");
-
-=head1 ACCESSORS
-
-=head2 deliveryservice
-
- data_type: 'integer'
- is_foreign_key: 1
- is_nullable: 0
-
-=head2 ext_user
-
- data_type: 'integer'
- is_foreign_key: 1
- is_nullable: 0
-
-=head2 last_updated
-
- data_type: 'timestamp'
- datetime_undef_if_invalid: 1
- default_value: current_timestamp
- is_nullable: 1
-
-=cut
-
-__PACKAGE__->add_columns(
- "deliveryservice",
- { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
- "ext_user",
- { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
- "last_updated",
- {
- data_type => "timestamp",
- datetime_undef_if_invalid => 1,
- default_value => \"current_timestamp",
- is_nullable => 1,
- },
-);
-
-=head1 PRIMARY KEY
-
-=over 4
-
-=item * L</deliveryservice>
-
-=item * L</ext_user>
-
-=back
-
-=cut
-
-__PACKAGE__->set_primary_key("deliveryservice", "ext_user");
-
-=head1 RELATIONS
-
-=head2 deliveryservice
-
-Type: belongs_to
-
-Related object: L<Schema::Result::Deliveryservice>
-
-=cut
-
-__PACKAGE__->belongs_to(
- "deliveryservice",
- "Schema::Result::Deliveryservice",
- { id => "deliveryservice" },
- { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
-);
-
-=head2 ext_user
-
-Type: belongs_to
-
-Related object: L<Schema::Result::ExtUser>
-
-=cut
-
-__PACKAGE__->belongs_to(
- "ext_user",
- "Schema::Result::ExtUser",
- { id => "ext_user" },
- { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
-);
-
-
-# Created by DBIx::Class::Schema::Loader v0.07038 @ 2014-05-31 10:56:04
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0mAZwi9FfXC0pwdB84yM0Q
-
-
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
-#
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-1;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c8bbc658/traffic_ops/app/lib/Schema/Result/Staticdn.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Schema/Result/Staticdn.pm b/traffic_ops/app/lib/Schema/Result/Staticdn.pm
deleted file mode 100644
index 10d1dc5..0000000
--- a/traffic_ops/app/lib/Schema/Result/Staticdn.pm
+++ /dev/null
@@ -1,205 +0,0 @@
-use utf8;
-#
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-package Schema::Result::Staticdn;
-
-# Created by DBIx::Class::Schema::Loader
-# DO NOT MODIFY THE FIRST PART OF THIS FILE
-
-=head1 NAME
-
-Schema::Result::Staticdn
-
-=cut
-
-use strict;
-use warnings;
-
-use base 'DBIx::Class::Core';
-
-=head1 TABLE: C<staticdns>
-
-=cut
-
-__PACKAGE__->table("staticdns");
-
-=head1 ACCESSORS
-
-=head2 id
-
- data_type: 'integer'
- is_auto_increment: 1
- is_nullable: 0
-
-=head2 host
-
- data_type: 'varchar'
- is_nullable: 0
- size: 45
-
-=head2 address
-
- data_type: 'varchar'
- is_nullable: 0
- size: 45
-
-=head2 type
-
- data_type: 'integer'
- is_foreign_key: 1
- is_nullable: 0
-
-=head2 ttl
-
- data_type: 'integer'
- default_value: 3600
- is_nullable: 0
-
-=cut
-
-__PACKAGE__->add_columns(
- "id",
- { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
- "host",
- { data_type => "varchar", is_nullable => 0, size => 45 },
- "address",
- { data_type => "varchar", is_nullable => 0, size => 45 },
- "type",
- { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
- "ttl",
- { data_type => "integer", default_value => 3600, is_nullable => 0 },
-);
-
-=head1 PRIMARY KEY
-
-=over 4
-
-=item * L</id>
-
-=back
-
-=cut
-
-__PACKAGE__->set_primary_key("id");
-
-=head1 UNIQUE CONSTRAINTS
-
-=head2 C<host_name_UNIQUE>
-
-=over 4
-
-=item * L</host>
-
-=back
-
-=cut
-
-__PACKAGE__->add_unique_constraint("host_name_UNIQUE", ["host"]);
-
-=head1 RELATIONS
-
-=head2 staticdns_deliveryservices
-
-Type: has_many
-
-Related object: L<Schema::Result::StaticdnsDeliveryservice>
-
-=cut
-
-__PACKAGE__->has_many(
- "staticdns_deliveryservices",
- "Schema::Result::StaticdnsDeliveryservice",
- { "foreign.staticdns" => "self.id" },
- { cascade_copy => 0, cascade_delete => 0 },
-);
-
-=head2 staticdns_locations
-
-Type: has_many
-
-Related object: L<Schema::Result::StaticdnsLocation>
-
-=cut
-
-__PACKAGE__->has_many(
- "staticdns_locations",
- "Schema::Result::StaticdnsLocation",
- { "foreign.staticdns" => "self.id" },
- { cascade_copy => 0, cascade_delete => 0 },
-);
-
-=head2 type
-
-Type: belongs_to
-
-Related object: L<Schema::Result::Type>
-
-=cut
-
-__PACKAGE__->belongs_to(
- "type",
- "Schema::Result::Type",
- { id => "type" },
- { is_deferrable => 1, on_delete => "NO ACTION", on_update => "NO ACTION" },
-);
-
-=head2 deliveryservices
-
-Type: many_to_many
-
-Composing rels: L</staticdns_deliveryservices> -> deliveryservice
-
-=cut
-
-__PACKAGE__->many_to_many(
- "deliveryservices",
- "staticdns_deliveryservices",
- "deliveryservice",
-);
-
-=head2 locations
-
-Type: many_to_many
-
-Composing rels: L</staticdns_locations> -> location
-
-=cut
-
-__PACKAGE__->many_to_many("locations", "staticdns_locations", "location");
-
-
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-18 16:59:25
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:C3Jv7K0u4um1s/Y1PH0ljA
-
-
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
-#
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-1;
[2/4] incubator-trafficcontrol git commit: make params unique in
fixtures by modifying values
Posted by ne...@apache.org.
make params unique in fixtures by modifying values
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/f3c86187
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/f3c86187
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/f3c86187
Branch: refs/heads/master
Commit: f3c86187016b773f2b4ce1240e6adc1e9a9a5a61
Parents: c8bbc65
Author: Dan Kirkwood <da...@gmail.com>
Authored: Thu Apr 27 22:15:25 2017 +0000
Committer: David Neuman <da...@gmail.com>
Committed: Tue May 2 09:43:49 2017 -0600
----------------------------------------------------------------------
.../app/lib/Fixtures/Integration/Parameter.pm | 28 ++++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/f3c86187/traffic_ops/app/lib/Fixtures/Integration/Parameter.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Fixtures/Integration/Parameter.pm b/traffic_ops/app/lib/Fixtures/Integration/Parameter.pm
index d3a0064..40dc851 100644
--- a/traffic_ops/app/lib/Fixtures/Integration/Parameter.pm
+++ b/traffic_ops/app/lib/Fixtures/Integration/Parameter.pm
@@ -73,7 +73,7 @@ use namespace::autoclean;
name => 'api.port',
config_file => 'server.xml',
last_updated => '2015-12-10 15:43:48',
- value => '8080',
+ value => '8081',
},
},
## id => 6
@@ -1983,7 +1983,7 @@ use namespace::autoclean;
new => 'Parameter',
using => {
name => 'CONFIG proxy.config.log.extended2_log_enabled',
- value => 'INT 0',
+ value => 'INT 1',
config_file => 'records.config',
last_updated => '2015-12-10 15:43:46',
},
@@ -2694,7 +2694,7 @@ use namespace::autoclean;
name => 'CONFIG proxy.config.stack_dump_enabled',
config_file => 'records.config',
last_updated => '2015-12-10 15:43:47',
- value => 'INT 1',
+ value => 'INT 0',
},
},
## id => 268
@@ -3283,7 +3283,7 @@ use namespace::autoclean;
using => {
name => 'health.threshold.availableBandwidthInKbps',
last_updated => '2015-12-10 15:43:47',
- value => '1062500',
+ value => '1062501',
config_file => 'rascal.properties',
},
},
@@ -3293,7 +3293,7 @@ use namespace::autoclean;
using => {
name => 'health.threshold.availableBandwidthInKbps',
last_updated => '2015-12-10 15:43:47',
- value => '1062500',
+ value => '1062502',
config_file => 'rascal.properties',
},
},
@@ -3883,7 +3883,7 @@ use namespace::autoclean;
using => {
name => 'LogFormat.Name',
last_updated => '2015-12-10 15:43:48',
- value => 'custom_ats_2',
+ value => 'custom_ats_3',
config_file => 'logs_xml.config',
},
},
@@ -3904,7 +3904,7 @@ use namespace::autoclean;
name => 'LogObject.Filename',
config_file => 'logs_xml.config',
last_updated => '2015-12-10 15:43:46',
- value => 'custom_ats_2',
+ value => 'custom_ats_3',
},
},
## id => 389
@@ -3922,7 +3922,7 @@ use namespace::autoclean;
new => 'Parameter',
using => {
name => 'LogObject.Format',
- value => 'custom_ats_2',
+ value => 'custom_ats_3',
config_file => 'logs_xml.config',
last_updated => '2015-12-10 15:43:48',
},
@@ -3982,7 +3982,7 @@ use namespace::autoclean;
new => 'Parameter',
using => {
name => 'maxRevalDurationDays',
- value => '90',
+ value => '60',
config_file => 'regex_revalidate.config',
last_updated => '2015-12-10 15:43:47',
},
@@ -4154,7 +4154,7 @@ use namespace::autoclean;
name => 'remap_stats.so',
config_file => 'plugin.config',
last_updated => '2015-12-10 15:43:46',
- value => '',
+ value => 'unknown',
},
},
## id => 414
@@ -4253,7 +4253,7 @@ use namespace::autoclean;
using => {
name => 'tld.ttls.NS',
last_updated => '2015-12-10 15:43:46',
- value => '3600',
+ value => '7200',
config_file => 'CRConfig.json',
},
},
@@ -4264,7 +4264,7 @@ use namespace::autoclean;
name => 'tld.ttls.SOA',
config_file => 'CRConfig.json',
last_updated => '2015-12-10 15:43:48',
- value => '86400',
+ value => '172800',
},
},
## id => 426
@@ -4392,7 +4392,7 @@ use namespace::autoclean;
new => 'Parameter',
using => {
name => 'trafficserver',
- value => '5.3.2-761.el6.x86_64',
+ value => '6.2.1-45.el7.x86_64',
config_file => 'package',
last_updated => '2015-12-10 15:43:46',
},
@@ -4404,7 +4404,7 @@ use namespace::autoclean;
name => 'trafficserver',
config_file => 'package',
last_updated => '2015-12-10 15:43:46',
- value => '5.3.2-761.el6.x86_64',
+ value => '6.2.1-48.el7.x86_64',
},
},
## id => 440
[4/4] incubator-trafficcontrol git commit: This closes #528
Posted by ne...@apache.org.
This closes #528
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/69b7cc4d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/69b7cc4d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/69b7cc4d
Branch: refs/heads/master
Commit: 69b7cc4d813bf09983626868c795d154572317cf
Parents: 36796c4
Author: David Neuman <da...@gmail.com>
Authored: Tue May 2 09:44:01 2017 -0600
Committer: David Neuman <da...@gmail.com>
Committed: Tue May 2 09:44:01 2017 -0600
----------------------------------------------------------------------
----------------------------------------------------------------------