You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2017/04/03 13:41:10 UTC

[1/2] incubator-trafficcontrol git commit: This closes #421

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master ab3da011d -> 566577c54


This closes #421


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

Branch: refs/heads/master
Commit: 566577c5442232935732cfae2598ef7b40263e2a
Parents: 72f40d3
Author: Dewayne Richardson <de...@apache.org>
Authored: Mon Apr 3 07:41:03 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Mon Apr 3 07:41:03 2017 -0600

----------------------------------------------------------------------

----------------------------------------------------------------------



[2/2] incubator-trafficcontrol git commit: fixes broken profile tests

Posted by de...@apache.org.
fixes broken profile tests


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

Branch: refs/heads/master
Commit: 72f40d33f14239be6a02fbcde0a088528d2f88fd
Parents: ab3da01
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Fri Mar 31 15:53:15 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Mon Apr 3 07:41:03 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/lib/API/Profile.pm  | 4 ++--
 traffic_ops/app/t/api/1.1/profile.t | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/72f40d33/traffic_ops/app/lib/API/Profile.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/Profile.pm b/traffic_ops/app/lib/API/Profile.pm
index 6b8831f..2f40bc2 100644
--- a/traffic_ops/app/lib/API/Profile.pm
+++ b/traffic_ops/app/lib/API/Profile.pm
@@ -25,7 +25,7 @@ use JSON;
 
 sub index {
 	my $self = shift;
-	my $orderby = $self->param('orderby') || "me.name";
+	my $orderby = $self->param('orderby');
 	my $parameter_id = $self->param('param');
 	my $cdn_id = $self->param('cdn');
 
@@ -33,7 +33,7 @@ sub index {
 	my %criteria;
 
 	if ( defined $parameter_id ) {
-		my $rs = $self->db->resultset('ProfileParameter')->search( { parameter => $parameter_id },  { prefetch => [ 'profile' ] }  );
+		my $rs = $self->db->resultset('ProfileParameter')->search( { parameter => $parameter_id },  { prefetch => [ 'profile' ], order_by => $orderby }  );
 		while ( my $row = $rs->next ) {
 			push(
 				@data, {

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/72f40d33/traffic_ops/app/t/api/1.1/profile.t
----------------------------------------------------------------------
diff --git a/traffic_ops/app/t/api/1.1/profile.t b/traffic_ops/app/t/api/1.1/profile.t
index ce9cab0..e9bb5fb 100644
--- a/traffic_ops/app/t/api/1.1/profile.t
+++ b/traffic_ops/app/t/api/1.1/profile.t
@@ -39,7 +39,7 @@ Test::TestHelper->load_core_data($schema);
 ok $t->post_ok( '/login', => form => { u => Test::TestHelper::PORTAL_USER, p => Test::TestHelper::PORTAL_USER_PASSWORD } )->status_is(302)
 	->or( sub { diag $t->tx->res->content->asset->{content}; } );
 
-$t->get_ok("/api/1.1/profiles.json")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )
+$t->get_ok("/api/1.1/profiles.json?orderby=name")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )
 	->json_is( "/response/0/name", "CCR1" )->json_is( "/response/0/description", "ccr description" )
 	->json_is( "/response/1/name", "CCR2" )->json_is( "/response/1/description", "ccr description" )
 	->json_is( "/response/2/name", "EDGE1" )->json_is( "/response/2/description", "edge description" )