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/21 19:05:43 UTC
[28/40] incubator-trafficcontrol git commit: fixed the profile.t test
case
fixed the profile.t test case
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/c2b001ca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/c2b001ca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/c2b001ca
Branch: refs/heads/psql-rebase
Commit: c2b001cafae1e4c67d085051a5eff078a9b88d44
Parents: 2132274
Author: Dewayne Richardson <de...@apache.org>
Authored: Fri Nov 18 07:43:49 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Mon Nov 21 12:04:10 2016 -0700
----------------------------------------------------------------------
traffic_ops/app/lib/API/Profile.pm | 2 +-
traffic_ops/app/t/api/1.2/profile.t | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c2b001ca/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 34b4a02..fff1b7a 100644
--- a/traffic_ops/app/lib/API/Profile.pm
+++ b/traffic_ops/app/lib/API/Profile.pm
@@ -30,7 +30,7 @@ sub index {
my $parameter_id = $self->param('param');
if ( defined $parameter_id ) {
- my $rs = $self->db->resultset('ProfileParameter')->search( { parameter => $parameter_id } );
+ my $rs = $self->db->resultset('ProfileParameter')->search( { parameter => $parameter_id }, { order_by => $orderby } );
while ( my $row = $rs->next ) {
push(
@data, {
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c2b001ca/traffic_ops/app/t/api/1.2/profile.t
----------------------------------------------------------------------
diff --git a/traffic_ops/app/t/api/1.2/profile.t b/traffic_ops/app/t/api/1.2/profile.t
index c071f06..54ff869 100644
--- a/traffic_ops/app/t/api/1.2/profile.t
+++ b/traffic_ops/app/t/api/1.2/profile.t
@@ -103,7 +103,7 @@ ok $t->put_ok('/api/1.2/profiles/' . $profile_id => {Accept => 'application/jso
})
->status_is(404)->or( sub { diag $t->tx->res->content->asset->{content}; } );
-ok $t->get_ok('/api/1.2/profiles?param=9' => {Accept => 'application/json'})->status_is(200)
+ok $t->get_ok('/api/1.2/profiles?param=9&orderby=profile' => {Accept => 'application/json'})->status_is(200)
->or( sub { diag $t->tx->res->content->asset->{content}; } )
->json_is( "/response/0/id" => "100" )
->json_is( "/response/0/name" => "EDGE1" )