You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2016/11/14 17:07:12 UTC

[09/53] [abbrv] incubator-trafficcontrol git commit: fixing integration.

fixing integration.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/e9139ad5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/e9139ad5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/e9139ad5

Branch: refs/heads/psql-rebase
Commit: e9139ad596c9583790d7f608597819be0d0ac5a1
Parents: 2ef8b27
Author: Jackie Heitzer <ja...@cable.comcast.com>
Authored: Mon Aug 1 09:52:35 2016 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Fri Nov 11 13:02:23 2016 -0700

----------------------------------------------------------------------
 traffic_ops/app/lib/Fixtures/Integration/Asn.pm |    87 +-
 .../app/lib/Fixtures/Integration/Cachegroup.pm  |   175 +-
 traffic_ops/app/lib/Fixtures/Integration/Cdn.pm |    27 +-
 .../lib/Fixtures/Integration/Deliveryservice.pm |   390 +-
 .../Integration/DeliveryserviceRegex.pm         |    79 +-
 .../Integration/DeliveryserviceServer.pm        |  2023 +-
 .../app/lib/Fixtures/Integration/Division.pm    |    25 +-
 .../lib/Fixtures/Integration/GooseDbVersion.pm  |   286 +-
 .../app/lib/Fixtures/Integration/Parameter.pm   |  4909 ++-
 .../lib/Fixtures/Integration/PhysLocation.pm    |   276 +-
 .../app/lib/Fixtures/Integration/Profile.pm     |   232 +-
 .../Fixtures/Integration/ProfileParameter.pm    | 35696 +++++++++++++++--
 .../app/lib/Fixtures/Integration/Regex.pm       |    90 +-
 .../app/lib/Fixtures/Integration/Region.pm      |    38 +-
 .../app/lib/Fixtures/Integration/Role.pm        |    70 +-
 .../app/lib/Fixtures/Integration/Server.pm      |  3164 +-
 .../app/lib/Fixtures/Integration/Servercheck.pm |   191 +-
 .../app/lib/Fixtures/Integration/Status.pm      |    70 +-
 .../app/lib/Fixtures/Integration/TmUser.pm      |   169 +-
 .../app/lib/Fixtures/Integration/ToExtension.pm |    65 +-
 .../app/lib/Fixtures/Integration/Type.pm        |   352 +-
 .../app/lib/Test/IntegrationTestHelper.pm       |    39 +-
 22 files changed, 43166 insertions(+), 5287 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e9139ad5/traffic_ops/app/lib/Fixtures/Integration/Asn.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Fixtures/Integration/Asn.pm b/traffic_ops/app/lib/Fixtures/Integration/Asn.pm
index 9692440..b001ad9 100644
--- a/traffic_ops/app/lib/Fixtures/Integration/Asn.pm
+++ b/traffic_ops/app/lib/Fixtures/Integration/Asn.pm
@@ -26,27 +26,92 @@ extends 'DBIx::Class::EasyFixture';
 use namespace::autoclean;
 
 my %definition_for = (
-'0' => { new => 'Asn', => using => { asn => '9939', cachegroup => '91', id => '1', last_updated => '2015-12-10 15:44:36', }, }, 
-'1' => { new => 'Asn', => using => { asn => '9839', cachegroup => '91', id => '2', last_updated => '2015-12-10 15:44:36', }, }, 
-'2' => { new => 'Asn', => using => { asn => '9933', cachegroup => '92', id => '3', last_updated => '2015-12-10 15:44:36', }, }, 
-'3' => { new => 'Asn', => using => { asn => '9930', cachegroup => '93', id => '4', last_updated => '2015-12-10 15:44:36', }, }, 
-'4' => { new => 'Asn', => using => { asn => '9931', cachegroup => '94', id => '5', last_updated => '2015-12-10 15:44:36', }, }, 
-'5' => { new => 'Asn', => using => { asn => '9932', cachegroup => '95', id => '6', last_updated => '2015-12-10 15:44:36', }, }, 
-'6' => { new => 'Asn', => using => { asn => '99', cachegroup => '96', id => '7', last_updated => '2015-12-10 15:44:36', }, }, 
-'7' => { new => 'Asn', => using => { asn => '33', cachegroup => '96', id => '8', last_updated => '2015-12-10 15:44:36', }, }, 
-); 
+	## id => 1
+	'0' => {
+		new => 'Asn',
+		using => {
+			asn => '33',
+			cachegroup => '96',
+			last_updated => '2015-12-10 15:44:36',
+		},
+	},
+	## id => 2
+	'1' => {
+		new => 'Asn',
+		using => {
+			asn => '99',
+			cachegroup => '96',
+			last_updated => '2015-12-10 15:44:36',
+		},
+	},
+	## id => 3
+	'2' => {
+		new => 'Asn',
+		using => {
+			asn => '9839',
+			cachegroup => '91',
+			last_updated => '2015-12-10 15:44:36',
+		},
+	},
+	## id => 4
+	'3' => {
+		new => 'Asn',
+		using => {
+			asn => '9930',
+			cachegroup => '93',
+			last_updated => '2015-12-10 15:44:36',
+		},
+	},
+	## id => 5
+	'4' => {
+		new => 'Asn',
+		using => {
+			asn => '9931',
+			cachegroup => '94',
+			last_updated => '2015-12-10 15:44:36',
+		},
+	},
+	## id => 6
+	'5' => {
+		new => 'Asn',
+		using => {
+			asn => '9932',
+			cachegroup => '95',
+			last_updated => '2015-12-10 15:44:36',
+		},
+	},
+	## id => 7
+	'6' => {
+		new => 'Asn',
+		using => {
+			asn => '9933',
+			cachegroup => '92',
+			last_updated => '2015-12-10 15:44:36',
+		},
+	},
+	## id => 8
+	'7' => {
+		new => 'Asn',
+		using => {
+			asn => '9939',
+			cachegroup => '91',
+			last_updated => '2015-12-10 15:44:36',
+		},
+	},
+);
 
 sub name {
 		return "Asn";
 }
 
-sub get_definition { 
+sub get_definition {
 		my ( $self, $name ) = @_;
 		return $definition_for{$name};
 }
 
 sub all_fixture_names {
-		return keys %definition_for;
+	# sort by db asn to guarantee insertion order
+	return (sort { $definition_for{$a}{using}{asn} cmp $definition_for{$b}{using}{asn} } keys %definition_for);
 }
 
 __PACKAGE__->meta->make_immutable;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e9139ad5/traffic_ops/app/lib/Fixtures/Integration/Cachegroup.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Fixtures/Integration/Cachegroup.pm b/traffic_ops/app/lib/Fixtures/Integration/Cachegroup.pm
index 021dad5..0b3944c 100644
--- a/traffic_ops/app/lib/Fixtures/Integration/Cachegroup.pm
+++ b/traffic_ops/app/lib/Fixtures/Integration/Cachegroup.pm
@@ -26,31 +26,176 @@ extends 'DBIx::Class::EasyFixture';
 use namespace::autoclean;
 
 my %definition_for = (
-'0' => { new => 'Cachegroup', => using => { name => 'mid-east', parent_cachegroup_id => '101', short_name => 'east', type => '7', id => '1', last_updated => '2015-12-10 15:44:36', latitude => '0', longitude => '0', }, }, 
-'1' => { new => 'Cachegroup', => using => { type => '7', id => '2', last_updated => '2015-12-10 15:44:36', latitude => '0', longitude => '0', name => 'mid-west', parent_cachegroup_id => '102', short_name => 'west', }, }, 
-'2' => { new => 'Cachegroup', => using => { short_name => 'clw', type => '4', id => '3', last_updated => '2015-12-10 15:44:36', latitude => '0', longitude => '0', name => 'dc-cloudwest', parent_cachegroup_id => undef, }, }, 
-'3' => { new => 'Cachegroup', => using => { longitude => '0', name => 'dc-cloudeast', parent_cachegroup_id => undef, short_name => 'cle', type => '4', id => '5', last_updated => '2015-12-10 15:44:36', latitude => '0', }, }, 
-'4' => { new => 'Cachegroup', => using => { last_updated => '2015-12-10 15:44:36', latitude => '40.71435', longitude => '-74.00597', name => 'us-ny-newyork', parent_cachegroup_id => '1', short_name => 'nyc', type => '6', id => '91', }, }, 
-'5' => { new => 'Cachegroup', => using => { parent_cachegroup_id => '2', short_name => 'lax', type => '6', id => '92', last_updated => '2015-12-10 15:44:36', latitude => '34.05', longitude => '-118.25', name => 'us-ca-losangeles', }, }, 
-'6' => { new => 'Cachegroup', => using => { parent_cachegroup_id => '2', short_name => 'chi', type => '6', id => '93', last_updated => '2015-12-10 15:44:36', latitude => '41.881944', longitude => '-87.627778', name => 'us-il-chicago', }, }, 
-'7' => { new => 'Cachegroup', => using => { parent_cachegroup_id => '1', short_name => 'hou', type => '6', id => '94', last_updated => '2015-12-10 15:44:36', latitude => '29.762778', longitude => '-95.383056', name => 'us-tx-houston', }, }, 
-'8' => { new => 'Cachegroup', => using => { name => 'us-pa-philadelphia', parent_cachegroup_id => '1', short_name => 'phl', type => '6', id => '95', last_updated => '2015-12-10 15:44:36', latitude => '39.664722', longitude => '-75.565278', }, }, 
-'9' => { new => 'Cachegroup', => using => { type => '6', id => '96', last_updated => '2015-12-10 15:44:36', latitude => '39.739167', longitude => '-104.984722', name => 'us-co-denver', parent_cachegroup_id => '2', short_name => 'den', }, }, 
-'10' => { new => 'Cachegroup', => using => { short_name => 'org-east', type => '36', id => '101', last_updated => '2015-12-10 15:44:36', latitude => '0', longitude => '0', name => 'origin-east', parent_cachegroup_id => undef, }, }, 
-'11' => { new => 'Cachegroup', => using => { name => 'origin-west', parent_cachegroup_id => undef, short_name => 'org-west', type => '36', id => '102', last_updated => '2015-12-10 15:44:36', latitude => '0', longitude => '0', }, }, 
-); 
+	## id => 1
+	'0' => {
+		new => 'Cachegroup',
+		using => {
+			name => 'dc-cloudeast',
+			longitude => '0',
+			parent_cachegroup_id => undef,
+			short_name => '0-cle',
+			type => '4',
+			last_updated => '2015-12-10 15:44:36',
+			latitude => '0',
+		},
+	},
+	## id => 2
+	'1' => {
+		new => 'Cachegroup',
+		using => {
+			name => 'dc-cloudwest',
+			short_name => '1-clw',
+			type => '4',
+			last_updated => '2015-12-10 15:44:36',
+			latitude => '0',
+			longitude => '0',
+			parent_cachegroup_id => undef,
+		},
+	},
+	## id => 3
+	'2' => {
+		new => 'Cachegroup',
+		using => {
+			name => 'origin-east',
+			short_name => '2-org-east',
+			type => '25',
+			last_updated => '2015-12-10 15:44:36',
+			latitude => '0',
+			longitude => '0',
+			parent_cachegroup_id => undef,
+		},
+	},
+	## id => 4
+	'3' => {
+		new => 'Cachegroup',
+		using => {
+			name => '3-mid-east',
+			parent_cachegroup_id => '5',
+			short_name => 'east',
+			type => '23',
+			last_updated => '2015-12-10 15:44:36',
+			latitude => '0',
+			longitude => '0',
+		},
+	},
+	## id => 5
+	'4' => {
+		new => 'Cachegroup',
+		using => {
+			name => 'origin-west',
+			parent_cachegroup_id => undef,
+			short_name => '4-org-west',
+			type => '25',
+			last_updated => '2015-12-10 15:44:36',
+			latitude => '0',
+			longitude => '0',
+		},
+	},
+	## id => 6
+	'5' => {
+		new => 'Cachegroup',
+		using => {
+			name => '5-mid-west',
+			type => '23',
+			last_updated => '2015-12-10 15:44:36',
+			latitude => '0',
+			longitude => '0',
+			parent_cachegroup_id => '6',
+			short_name => 'west',
+		},
+	},
+	## id => 7
+	'6' => {
+		new => 'Cachegroup',
+		using => {
+			name => 'us-ca-losangeles',
+			parent_cachegroup_id => '4',
+			short_name => '6-lax',
+			type => '14',
+			last_updated => '2015-12-10 15:44:36',
+			latitude => '34.05',
+			longitude => '-118.25',
+		},
+	},
+	## id => 8
+	'7' => {
+		new => 'Cachegroup',
+		using => {
+			name => 'us-co-denver',
+			type => '14',
+			last_updated => '2015-12-10 15:44:36',
+			latitude => '39.739167',
+			longitude => '-104.984722',
+			parent_cachegroup_id => '4',
+			short_name => '7-den',
+		},
+	},
+	## id => 9
+	'8' => {
+		new => 'Cachegroup',
+		using => {
+			name => 'us-il-chicago',
+			parent_cachegroup_id => '4',
+			short_name => '8-chi',
+			type => '14',
+			last_updated => '2015-12-10 15:44:36',
+			latitude => '41.881944',
+			longitude => '-87.627778',
+		},
+	},
+	## id => 10
+	'9' => {
+		new => 'Cachegroup',
+		using => {
+			name => 'us-ny-newyork',
+			last_updated => '2015-12-10 15:44:36',
+			latitude => '40.71435',
+			longitude => '-74.00597',
+			parent_cachegroup_id => '3',
+			short_name => '9-nyc',
+			type => '14',
+		},
+	},
+	## id => 11
+	'10' => {
+		new => 'Cachegroup',
+		using => {
+			name => 'us-pa-philadelphia',
+			parent_cachegroup_id => '3',
+			short_name => '10-phl',
+			type => '14',
+			last_updated => '2015-12-10 15:44:36',
+			latitude => '39.664722',
+			longitude => '-75.565278',
+		},
+	},
+	## id => 12
+	'11' => {
+		new => 'Cachegroup',
+		using => {
+			name => 'us-tx-houston',
+			parent_cachegroup_id => '3',
+			short_name => '11-hou',
+			type => '14',
+			last_updated => '2015-12-10 15:44:36',
+			latitude => '29.762778',
+			longitude => '-95.383056',
+		},
+	},
+);
 
 sub name {
 		return "Cachegroup";
 }
 
-sub get_definition { 
+sub get_definition {
 		my ( $self, $name ) = @_;
 		return $definition_for{$name};
 }
 
 sub all_fixture_names {
-		return keys %definition_for;
+	# sort by db short_name to guarantee insertion order
+	return (sort { $definition_for{$a}{using}{short_name} cmp $definition_for{$b}{using}{short_name} } keys %definition_for);
 }
 
 __PACKAGE__->meta->make_immutable;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e9139ad5/traffic_ops/app/lib/Fixtures/Integration/Cdn.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Fixtures/Integration/Cdn.pm b/traffic_ops/app/lib/Fixtures/Integration/Cdn.pm
index d6e7888..d3a7eef 100644
--- a/traffic_ops/app/lib/Fixtures/Integration/Cdn.pm
+++ b/traffic_ops/app/lib/Fixtures/Integration/Cdn.pm
@@ -26,21 +26,38 @@ extends 'DBIx::Class::EasyFixture';
 use namespace::autoclean;
 
 my %definition_for = (
-'0' => { new => 'Cdn', => using => { dnssec_enabled => '0', id => '1', last_updated => '2015-12-10 15:43:45', name => 'cdn_number_1', }, }, 
-'1' => { new => 'Cdn', => using => { name => 'cdn_number_2', dnssec_enabled => '0', id => '2', last_updated => '2015-12-10 15:43:45', }, }, 
-); 
+	## id => 1
+	'0' => {
+		new => 'Cdn',
+		using => {
+			name => 'cdn_number_1',
+			dnssec_enabled => '0',
+			last_updated => '2015-12-10 15:43:45',
+		},
+	},
+	## id => 2
+	'1' => {
+		new => 'Cdn',
+		using => {
+			name => 'cdn_number_2',
+			dnssec_enabled => '0',
+			last_updated => '2015-12-10 15:43:45',
+		},
+	},
+);
 
 sub name {
 		return "Cdn";
 }
 
-sub get_definition { 
+sub get_definition {
 		my ( $self, $name ) = @_;
 		return $definition_for{$name};
 }
 
 sub all_fixture_names {
-		return keys %definition_for;
+	# sort by db name to guarantee insertion order
+	return (sort { $definition_for{$a}{using}{name} cmp $definition_for{$b}{using}{name} } keys %definition_for);
 }
 
 __PACKAGE__->meta->make_immutable;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e9139ad5/traffic_ops/app/lib/Fixtures/Integration/Deliveryservice.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Fixtures/Integration/Deliveryservice.pm b/traffic_ops/app/lib/Fixtures/Integration/Deliveryservice.pm
index 5579682..65c9615 100644
--- a/traffic_ops/app/lib/Fixtures/Integration/Deliveryservice.pm
+++ b/traffic_ops/app/lib/Fixtures/Integration/Deliveryservice.pm
@@ -26,65 +26,116 @@ extends 'DBIx::Class::EasyFixture';
 use namespace::autoclean;
 
 my %definition_for = (
+	## id => 1
 	'0' => {
 		new      => 'Deliveryservice',
-		=> using => {
-			regional_geo_blocking => 0,
-			remap_text            => undef,
-			check_path            => '/crossdomain.xml',
-			ipv6_routing_enabled  => '1',
-			origin_shield         => undef,
-			dns_bypass_ip         => '',
-			dns_bypass_ip6        => undef,
-			mid_header_rewrite =>
-				'cond %{REMAP_PSEUDO_HOOK} __RETURN__ set-config proxy.config.http.parent_origin.dead_server_retry_enabled 1__RETURN__ set-config proxy.config.http.parent_origin.simple_retry_enabled 1__RETURN__ set-config proxy.config.http.parent_origin.simple_retry_response_codes "400,404,412"__RETURN__ set-config proxy.config.http.parent_origin.dead_server_retry_response_codes "502,503" __RETURN__ set-config proxy.config.http.connect_attempts_timeout 2 __RETURN__ set-config proxy.config.http.connect_attempts_max_retries 2 __RETURN__ set-config proxy.config.http.connect_attempts_max_retries_dead_server 1__RETURN__ set-config proxy.config.http.transaction_active_timeout_in 5 [L]',
-			dscp                        => '40',
-			info_url                    => 'http://movies.info.kabletown.net',
-			last_updated                => '2015-12-10 15:44:37',
-			signed                      => '0',
+		using => {
+			xml_id                      => 'cdl-c2',
+			regional_geo_blocking       => 0,
+			check_path                  => '/crossdomain.xml',
+			info_url                    => '',
 			ccr_dns_ttl                 => '3600',
-			cdn_id                      => '1',
-			display_name                => 'movies-c1',
-			protocol                    => '0',
-			cacheurl                    => undef,
+			dns_bypass_cname            => undef,
+			global_max_mbps             => '0',
 			http_bypass_fqdn            => '',
+			last_updated                => '2015-12-10 15:44:37',
+			long_desc                   => 'long_desc',
+			long_desc_2                 => 'long_desc_2',
 			miss_lat                    => '41.881944',
-			dns_bypass_ttl              => undef,
-			geo_limit                   => '0',
-			long_desc                   => 'test-ds1 long_desc',
-			id                          => '1',
-			initial_dispersion          => '1',
-			long_desc_1                 => 'test-ds1 long_desc_1',
-			max_dns_answers             => '0',
-			multi_site_origin           => '1',
-			multi_site_origin_algorithm => '0',
+			protocol                    => '0',
+			qstring_ignore              => '0',
+			type                        => '16',
+			dns_bypass_ip6              => undef,
+			dscp                        => '40',
+			mid_header_rewrite          => 'cond %{REMAP_PSEUDO_HOOK} __RETURN__ set-config proxy.config.http.parent_origin.dead_server_retry_enabled 1',
 			active                      => '1',
-			edge_header_rewrite         => 'cond %{REMAP_PSEUDO_HOOK} __RETURN__ set-config proxy.config.http.transaction_active_timeout_out 5 [L]',
-			global_max_mbps             => '0',
+			geo_limit                   => '0',
+			miss_long                   => '-87.627778',
+			origin_shield               => undef,
+			regex_remap                 => undef,
+			remap_text                  => undef,
+			cacheurl                    => undef,
+			display_name                => 'cdl-c2',
+			ipv6_routing_enabled        => undef,
+			long_desc_1                 => 'long_desc_1',
+			profile                     => '8',
 			ssl_key_version             => '0',
-			xml_id                      => 'movies-c1',
-			org_server_fqdn             => 'http://movies.origin.kabletown.net',
+			global_max_tps              => '0',
+			max_dns_answers             => '0',
+			tr_response_headers         => undef,
+			cdn_id                      => '2',
+			dns_bypass_ttl              => undef,
+			initial_dispersion          => '1',
+			org_server_fqdn             => 'http://cdl.origin.kabletown.net',
 			range_request_handling      => '0',
-			regex_remap                 => undef,
+			signed                      => '1',
+			dns_bypass_ip               => '',
+			edge_header_rewrite         => 'add-header X-Powered-By: KBLTN [L]',
+			multi_site_origin           => undef,
+			multi_site_origin_algorithm => undef,
+			tr_request_headers          => undef,
+		},
+	},
+	## id => 2
+	'1' => {
+		new      => 'Deliveryservice',
+		using => {
+			xml_id                      => 'games-c1',
+			regional_geo_blocking       => 0,
+			multi_site_origin           => undef,
+			multi_site_origin_algorithm => undef,
+			protocol                    => '0',
+			dns_bypass_ttl              => undef,
+			edge_header_rewrite         => 'cond %{SEND_RESPONSE_HDR_HOOK} __RETURN__ add-header X-CDN-Info "KableTown___CACHE_IPV4__" [L]',
+			geo_limit                   => '0',
+			long_desc                   => 'test-ds3 long_desc',
 			miss_long                   => '-87.627778',
 			profile                     => '5',
-			tr_response_headers         => undef,
+			qstring_ignore              => '0',
+			active                      => '1',
+			cacheurl                    => undef,
 			dns_bypass_cname            => undef,
+			dns_bypass_ip               => '',
+			initial_dispersion          => '1',
+			range_request_handling      => '0',
+			type                        => '10',
+			ipv6_routing_enabled        => undef,
+			tr_response_headers         => undef,
+			cdn_id                      => '1',
+			global_max_mbps             => '0',
 			global_max_tps              => '0',
-			long_desc_2                 => 'test-ds1 long_desc_2',
-			qstring_ignore              => '0',
+			long_desc_2                 => 'test-ds3 long_desc_2',
+			origin_shield               => undef,
+			long_desc_1                 => 'test-ds3 long_desc_1',
+			ssl_key_version             => '0',
 			tr_request_headers          => undef,
-			type                        => '8',
+			check_path                  => '/crossdomain.xml',
+			display_name                => 'games-c1',
+			http_bypass_fqdn            => '',
+			info_url                    => 'http://games.info.kabletown.net',
+			org_server_fqdn             => 'http://games.origin.kabletown.net',
+			ccr_dns_ttl                 => '3600',
+			dns_bypass_ip6              => undef,
+			last_updated                => '2015-12-10 15:44:37',
+			max_dns_answers             => '0',
+			miss_lat                    => '41.881944',
+			dscp                        => '40',
+			mid_header_rewrite          => undef,
+			regex_remap                 => undef,
+			remap_text                  => undef,
+			signed                      => '0',
 		},
 	},
-	'1' => {
+	## id => 3
+	'2' => {
 		new      => 'Deliveryservice',
-		=> using => {
+		using => {
+			xml_id                      => 'images-c1',
 			regional_geo_blocking       => 0,
 			ipv6_routing_enabled        => undef,
 			mid_header_rewrite          => undef,
 			signed                      => '0',
-			type                        => '9',
+			type                        => '10',
 			dns_bypass_cname            => undef,
 			multi_site_origin           => undef,
 			multi_site_origin_algorithm => undef,
@@ -100,11 +151,9 @@ my %definition_for = (
 			long_desc_1                 => 'test-ds2 long_desc_1',
 			info_url                    => 'http://images.info.kabletown.net',
 			regex_remap                 => undef,
-			xml_id                      => 'images-c1',
 			active                      => '1',
 			dns_bypass_ip6              => undef,
 			dns_bypass_ttl              => undef,
-			id                          => '2',
 			protocol                    => '0',
 			range_request_handling      => '0',
 			geo_limit                   => '0',
@@ -127,74 +176,75 @@ my %definition_for = (
 			miss_lat                    => '41.881944',
 		},
 	},
-	'2' => {
+	## id => 4
+	'3' => {
 		new      => 'Deliveryservice',
-		=> using => {
-			regional_geo_blocking       => 0,
-			multi_site_origin           => undef,
-			multi_site_origin_algorithm => undef,
+		using => {
+			xml_id                			=> 'movies-c1',
+			regional_geo_blocking 			=> 0,
+			remap_text            			=> undef,
+			check_path            			=> '/crossdomain.xml',
+			ipv6_routing_enabled  			=> '1',
+			origin_shield         			=> undef,
+			dns_bypass_ip         			=> '',
+			dns_bypass_ip6        			=> undef,
+			mid_header_rewrite	 				=>
+				'cond %{REMAP_PSEUDO_HOOK} __RETURN__ set-config proxy.config.http.parent_origin.dead_server_retry_enabled 1__RETURN__ set-config proxy.config.http.parent_origin.simple_retry_enabled 1__RETURN__ set-config proxy.config.http.parent_origin.simple_retry_response_codes "400,404,412"__RETURN__ set-config proxy.config.http.parent_origin.dead_server_retry_response_codes "502,503" __RETURN__ set-config proxy.config.http.connect_attempts_timeout 2 __RETURN__ set-config proxy.config.http.connect_attempts_max_retries 2 __RETURN__ set-config proxy.config.http.connect_attempts_max_retries_dead_server 1__RETURN__ set-config proxy.config.http.transaction_active_timeout_in 5 [L]',
+			dscp                        => '40',
+			info_url                    => 'http://movies.info.kabletown.net',
+			last_updated                => '2015-12-10 15:44:37',
+			signed                      => '0',
+			ccr_dns_ttl                 => '3600',
+			cdn_id                      => '1',
+			display_name                => 'movies-c1',
 			protocol                    => '0',
+			cacheurl                    => undef,
+			http_bypass_fqdn            => '',
+			miss_lat                    => '41.881944',
 			dns_bypass_ttl              => undef,
-			edge_header_rewrite         => 'cond %{SEND_RESPONSE_HDR_HOOK} __RETURN__ add-header X-CDN-Info "KableTown___CACHE_IPV4__" [L]',
 			geo_limit                   => '0',
-			id                          => '3',
-			long_desc                   => 'test-ds3 long_desc',
-			miss_long                   => '-87.627778',
-			profile                     => '5',
-			qstring_ignore              => '0',
-			active                      => '1',
-			cacheurl                    => undef,
-			dns_bypass_cname            => undef,
-			dns_bypass_ip               => '',
+			long_desc                   => 'test-ds1 long_desc',
 			initial_dispersion          => '1',
+			long_desc_1                 => 'test-ds1 long_desc_1',
+			max_dns_answers             => '0',
+			multi_site_origin           => '1',
+			multi_site_origin_algorithm => '0',
+			active                      => '1',
+			edge_header_rewrite         => 'cond %{REMAP_PSEUDO_HOOK} __RETURN__ set-config proxy.config.http.transaction_active_timeout_out 5 [L]',
+			global_max_mbps             => '0',
+			ssl_key_version             => '0',
+			org_server_fqdn             => 'http://movies.origin.kabletown.net',
 			range_request_handling      => '0',
-			type                        => '9',
-			ipv6_routing_enabled        => undef,
+			regex_remap                 => undef,
+			miss_long                   => '-87.627778',
+			profile                     => '5',
 			tr_response_headers         => undef,
-			cdn_id                      => '1',
-			global_max_mbps             => '0',
+			dns_bypass_cname            => undef,
 			global_max_tps              => '0',
-			long_desc_2                 => 'test-ds3 long_desc_2',
-			origin_shield               => undef,
-			long_desc_1                 => 'test-ds3 long_desc_1',
-			ssl_key_version             => '0',
+			long_desc_2                 => 'test-ds1 long_desc_2',
+			qstring_ignore              => '0',
 			tr_request_headers          => undef,
-			xml_id                      => 'games-c1',
-			check_path                  => '/crossdomain.xml',
-			display_name                => 'games-c1',
-			http_bypass_fqdn            => '',
-			info_url                    => 'http://games.info.kabletown.net',
-			org_server_fqdn             => 'http://games.origin.kabletown.net',
-			ccr_dns_ttl                 => '3600',
-			dns_bypass_ip6              => undef,
-			last_updated                => '2015-12-10 15:44:37',
-			max_dns_answers             => '0',
-			miss_lat                    => '41.881944',
-			dscp                        => '40',
-			mid_header_rewrite          => undef,
-			regex_remap                 => undef,
-			remap_text                  => undef,
-			signed                      => '0',
+			type                        => '16',
 		},
 	},
-	'3' => {
+	## id => 5
+	'4' => {
 		new      => 'Deliveryservice',
-		=> using => {
+		using => {
+			xml_id                      => 'tv-c1',
 			regional_geo_blocking       => 0,
 			miss_lat                    => '41.881944',
 			remap_text                  => undef,
 			signed                      => '0',
 			tr_request_headers          => undef,
-			id                          => '4',
 			long_desc_1                 => 'test-ds1 long_desc_1',
 			long_desc                   => 'test-ds1 long_desc',
 			miss_long                   => '-87.627778',
 			ssl_key_version             => '0',
-			type                        => '13',
+			type                        => '17',
 			ccr_dns_ttl                 => '3600',
 			dns_bypass_cname            => undef,
 			regex_remap                 => undef,
-			xml_id                      => 'tv-c1',
 			dns_bypass_ip6              => undef,
 			dscp                        => '40',
 			range_request_handling      => '0',
@@ -227,109 +277,11 @@ my %definition_for = (
 			dns_bypass_ttl              => undef,
 		},
 	},
-	'4' => {
-		new      => 'Deliveryservice',
-		=> using => {
-			regional_geo_blocking       => 0,
-			check_path                  => '/crossdomain.xml',
-			dns_bypass_ip               => '',
-			miss_long                   => '-87.627778',
-			origin_shield               => undef,
-			range_request_handling      => '0',
-			remap_text                  => undef,
-			cdn_id                      => '2',
-			long_desc_2                 => 'test long_desc_2',
-			tr_request_headers          => undef,
-			type                        => '24',
-			info_url                    => 'http://tv.info.kabletown.net',
-			max_dns_answers             => '0',
-			profile                     => '8',
-			ccr_dns_ttl                 => '3600',
-			dns_bypass_cname            => undef,
-			dscp                        => '40',
-			global_max_tps              => '0',
-			initial_dispersion          => '1',
-			multi_site_origin           => undef,
-			multi_site_origin_algorithm => undef,
-			org_server_fqdn             => 'http://national-tv.origin.kabletown.net',
-			signed                      => '0',
-			xml_id                      => 'tv-nat-c2',
-			display_name                => 'tv-nat-c2',
-			dns_bypass_ip6              => undef,
-			dns_bypass_ttl              => undef,
-			long_desc                   => 'test long_desc',
-			active                      => '0',
-			cacheurl                    => undef,
-			geo_limit                   => '0',
-			mid_header_rewrite          => undef,
-			tr_response_headers         => undef,
-			edge_header_rewrite         => undef,
-			id                          => '11',
-			last_updated                => '2015-12-10 15:44:37',
-			regex_remap                 => undef,
-			ssl_key_version             => '0',
-			global_max_mbps             => '0',
-			http_bypass_fqdn            => '',
-			ipv6_routing_enabled        => undef,
-			long_desc_1                 => 'test long_desc_1',
-			miss_lat                    => '41.881944',
-			protocol                    => '0',
-			qstring_ignore              => '0',
-		},
-	},
+	## id => 6
 	'5' => {
 		new      => 'Deliveryservice',
-		=> using => {
-			regional_geo_blocking       => 0,
-			check_path                  => '/crossdomain.xml',
-			info_url                    => '',
-			ccr_dns_ttl                 => '3600',
-			dns_bypass_cname            => undef,
-			global_max_mbps             => '0',
-			http_bypass_fqdn            => '',
-			last_updated                => '2015-12-10 15:44:37',
-			long_desc                   => 'long_desc',
-			long_desc_2                 => 'long_desc_2',
-			miss_lat                    => '41.881944',
-			protocol                    => '0',
-			qstring_ignore              => '0',
-			type                        => '8',
-			dns_bypass_ip6              => undef,
-			dscp                        => '40',
-			id                          => '12',
-			mid_header_rewrite          => 'cond %{REMAP_PSEUDO_HOOK} __RETURN__ set-config proxy.config.http.parent_origin.dead_server_retry_enabled 1',
-			xml_id                      => 'cdl-c2',
-			active                      => '1',
-			geo_limit                   => '0',
-			miss_long                   => '-87.627778',
-			origin_shield               => undef,
-			regex_remap                 => undef,
-			remap_text                  => undef,
-			cacheurl                    => undef,
-			display_name                => 'cdl-c2',
-			ipv6_routing_enabled        => undef,
-			long_desc_1                 => 'long_desc_1',
-			profile                     => '8',
-			ssl_key_version             => '0',
-			global_max_tps              => '0',
-			max_dns_answers             => '0',
-			tr_response_headers         => undef,
-			cdn_id                      => '2',
-			dns_bypass_ttl              => undef,
-			initial_dispersion          => '1',
-			org_server_fqdn             => 'http://cdl.origin.kabletown.net',
-			range_request_handling      => '0',
-			signed                      => '1',
-			dns_bypass_ip               => '',
-			edge_header_rewrite         => 'add-header X-Powered-By: KBLTN [L]',
-			multi_site_origin           => undef,
-			multi_site_origin_algorithm => undef,
-			tr_request_headers          => undef,
-		},
-	},
-	'6' => {
-		new      => 'Deliveryservice',
-		=> using => {
+		using => {
+			xml_id                      => 'tv-local-c2',
 			regional_geo_blocking       => 0,
 			origin_shield               => undef,
 			range_request_handling      => '0',
@@ -354,7 +306,6 @@ my %definition_for = (
 			org_server_fqdn             => 'https://games.origin.kabletown.net',
 			multi_site_origin           => undef,
 			multi_site_origin_algorithm => undef,
-			xml_id                      => 'tv-local-c2',
 			cacheurl                    => undef,
 			dns_bypass_ip               => '',
 			dns_bypass_ip6              => undef,
@@ -366,20 +317,71 @@ my %definition_for = (
 			ipv6_routing_enabled        => undef,
 			long_desc_2                 => 'test-ds3 long_desc_2',
 			tr_request_headers          => undef,
-			type                        => '13',
+			type                        => '17',
 			ccr_dns_ttl                 => '3600',
 			dns_bypass_ttl              => undef,
 			edge_header_rewrite         => undef,
 			initial_dispersion          => '1',
-			id                          => '13',
 			last_updated                => '2015-12-10 15:44:37',
 			long_desc_1                 => 'test-ds3 long_desc_1',
 			protocol                    => '0',
 		},
 	},
+	## id => 7
+	'6' => {
+		new      => 'Deliveryservice',
+		using => {
+			xml_id                      => 'tv-nat-c2',
+			regional_geo_blocking       => 0,
+			check_path                  => '/crossdomain.xml',
+			dns_bypass_ip               => '',
+			miss_long                   => '-87.627778',
+			origin_shield               => undef,
+			range_request_handling      => '0',
+			remap_text                  => undef,
+			cdn_id                      => '2',
+			long_desc_2                 => 'test long_desc_2',
+			tr_request_headers          => undef,
+			type                        => '18',
+			info_url                    => 'http://tv.info.kabletown.net',
+			max_dns_answers             => '0',
+			profile                     => '8',
+			ccr_dns_ttl                 => '3600',
+			dns_bypass_cname            => undef,
+			dscp                        => '40',
+			global_max_tps              => '0',
+			initial_dispersion          => '1',
+			multi_site_origin           => undef,
+			multi_site_origin_algorithm => undef,
+			org_server_fqdn             => 'http://national-tv.origin.kabletown.net',
+			signed                      => '0',
+			display_name                => 'tv-nat-c2',
+			dns_bypass_ip6              => undef,
+			dns_bypass_ttl              => undef,
+			long_desc                   => 'test long_desc',
+			active                      => '0',
+			cacheurl                    => undef,
+			geo_limit                   => '0',
+			mid_header_rewrite          => undef,
+			tr_response_headers         => undef,
+			edge_header_rewrite         => undef,
+			last_updated                => '2015-12-10 15:44:37',
+			regex_remap                 => undef,
+			ssl_key_version             => '0',
+			global_max_mbps             => '0',
+			http_bypass_fqdn            => '',
+			ipv6_routing_enabled        => undef,
+			long_desc_1                 => 'test long_desc_1',
+			miss_lat                    => '41.881944',
+			protocol                    => '0',
+			qstring_ignore              => '0',
+		},
+	},
+	## id => 8
 	'7' => {
 		new      => 'Deliveryservice',
-		=> using => {
+		using => {
+			xml_id                      => 'tv-nocache-c2',
 			regional_geo_blocking       => 0,
 			check_path                  => '/crossdomain.xml',
 			signed                      => '0',
@@ -393,11 +395,9 @@ my %definition_for = (
 			multi_site_origin_algorithm => undef,
 			origin_shield               => undef,
 			protocol                    => '0',
-			id                          => '14',
 			ipv6_routing_enabled        => undef,
 			long_desc_1                 => 'test- long_desc_1',
 			tr_response_headers         => undef,
-			xml_id                      => 'tv-nocache-c2',
 			active                      => '1',
 			cacheurl                    => undef,
 			ccr_dns_ttl                 => '3600',
@@ -419,7 +419,7 @@ my %definition_for = (
 			miss_lat                    => '41.881944',
 			profile                     => '8',
 			ssl_key_version             => '0',
-			type                        => '11',
+			type                        => '19',
 			edge_header_rewrite         => undef,
 			global_max_mbps             => '0',
 			info_url                    => '',
@@ -439,8 +439,8 @@ sub get_definition {
 }
 
 sub all_fixture_names {
-	return keys %definition_for;
+	# sort by db xml_id to guarantee insertion order
+	return (sort { $definition_for{$a}{using}{xml_id} cmp $definition_for{$b}{using}{xml_id} } keys %definition_for);
 }
-
 __PACKAGE__->meta->make_immutable;
 1;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e9139ad5/traffic_ops/app/lib/Fixtures/Integration/DeliveryserviceRegex.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Fixtures/Integration/DeliveryserviceRegex.pm b/traffic_ops/app/lib/Fixtures/Integration/DeliveryserviceRegex.pm
index 11eb87d..e8d54df 100644
--- a/traffic_ops/app/lib/Fixtures/Integration/DeliveryserviceRegex.pm
+++ b/traffic_ops/app/lib/Fixtures/Integration/DeliveryserviceRegex.pm
@@ -26,27 +26,84 @@ extends 'DBIx::Class::EasyFixture';
 use namespace::autoclean;
 
 my %definition_for = (
-'0' => { new => 'DeliveryserviceRegex', => using => { regex => '1', set_number => '0', deliveryservice => '1', }, }, 
-'1' => { new => 'DeliveryserviceRegex', => using => { deliveryservice => '2', regex => '2', set_number => '0', }, }, 
-'2' => { new => 'DeliveryserviceRegex', => using => { set_number => '0', deliveryservice => '3', regex => '3', }, }, 
-'3' => { new => 'DeliveryserviceRegex', => using => { deliveryservice => '4', regex => '4', set_number => '0', }, }, 
-'4' => { new => 'DeliveryserviceRegex', => using => { deliveryservice => '11', regex => '11', set_number => '0', }, }, 
-'5' => { new => 'DeliveryserviceRegex', => using => { deliveryservice => '12', regex => '12', set_number => '0', }, }, 
-'6' => { new => 'DeliveryserviceRegex', => using => { deliveryservice => '13', regex => '13', set_number => '0', }, }, 
-'7' => { new => 'DeliveryserviceRegex', => using => { deliveryservice => '14', regex => '14', set_number => '0', }, }, 
-); 
+	'0' => {
+		new => 'DeliveryserviceRegex',
+		using => {
+			regex => '1',
+			set_number => '0',
+			deliveryservice => '1',
+		},
+	},
+	'1' => {
+		new => 'DeliveryserviceRegex',
+		using => {
+			regex => '2',
+			deliveryservice => '2',
+			set_number => '0',
+		},
+	},
+	'2' => {
+		new => 'DeliveryserviceRegex',
+		using => {
+			regex => '3',
+			set_number => '0',
+			deliveryservice => '3',
+		},
+	},
+	'3' => {
+		new => 'DeliveryserviceRegex',
+		using => {
+			regex => '4',
+			deliveryservice => '4',
+			set_number => '0',
+		},
+	},
+	'4' => {
+		new => 'DeliveryserviceRegex',
+		using => {
+			regex => '11',
+			deliveryservice => '11',
+			set_number => '0',
+		},
+	},
+	'5' => {
+		new => 'DeliveryserviceRegex',
+		using => {
+			regex => '12',
+			deliveryservice => '12',
+			set_number => '0',
+		},
+	},
+	'6' => {
+		new => 'DeliveryserviceRegex',
+		using => {
+			regex => '13',
+			deliveryservice => '13',
+			set_number => '0',
+		},
+	},
+	'7' => {
+		new => 'DeliveryserviceRegex',
+		using => {
+			regex => '14',
+			deliveryservice => '14',
+			set_number => '0',
+		},
+	},
+);
 
 sub name {
 		return "DeliveryserviceRegex";
 }
 
-sub get_definition { 
+sub get_definition {
 		my ( $self, $name ) = @_;
 		return $definition_for{$name};
 }
 
 sub all_fixture_names {
-		return keys %definition_for;
+	# sort by db regex to guarantee insertion order
+	return (sort { $definition_for{$a}{using}{regex} cmp $definition_for{$b}{using}{regex} } keys %definition_for);
 }
 
 __PACKAGE__->meta->make_immutable;