You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2017/03/09 19:09:26 UTC
[18/44] incubator-trafficcontrol git commit: Change CDN ids in tests
Change CDN ids in 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/4a1af469
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/4a1af469
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/4a1af469
Branch: refs/heads/master
Commit: 4a1af4692ccc6a9eb8974258c716138fdc326f28
Parents: 67ca5bf
Author: Jan van Doorn <ja...@cable.comcast.com>
Authored: Fri Jan 13 14:00:25 2017 -0700
Committer: Jan van Doorn <jv...@apache.org>
Committed: Fri Feb 17 17:49:10 2017 +0000
----------------------------------------------------------------------
traffic_ops/app/lib/Fixtures/Profile.pm | 15 ++++++++-------
traffic_ops/app/t/api/1.1/profile.t | 3 ++-
traffic_ops/app/t/api/1.2/profile.t | 4 ++--
traffic_ops/app/t/profile.t | 4 ++--
4 files changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4a1af469/traffic_ops/app/lib/Fixtures/Profile.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Fixtures/Profile.pm b/traffic_ops/app/lib/Fixtures/Profile.pm
index bb2a33a..4b021d2 100644
--- a/traffic_ops/app/lib/Fixtures/Profile.pm
+++ b/traffic_ops/app/lib/Fixtures/Profile.pm
@@ -24,7 +24,7 @@ my %definition_for = (
id => 100,
name => 'EDGE1',
description => 'edge description',
- cdn => 1,
+ cdn => 100,
type => 'ATS_PROFILE',
},
},
@@ -34,7 +34,7 @@ my %definition_for = (
id => 200,
name => 'MID1',
description => 'mid description',
- cdn => 1,
+ cdn => 100,
type => 'ATS_PROFILE',
},
},
@@ -44,7 +44,7 @@ my %definition_for = (
id => 300,
name => 'CCR1',
description => 'ccr description',
- cdn => 1,
+ cdn => 100,
type => 'TR_PROFILE',
},
},
@@ -54,7 +54,7 @@ my %definition_for = (
id => 301,
name => 'CCR2',
description => 'ccr description',
- cdn => 2,
+ cdn => 200,
type => 'TR_PROFILE',
},
},
@@ -64,7 +64,7 @@ my %definition_for = (
id => 500,
name => 'RIAK1',
description => 'riak description',
- cdn => 1,
+ cdn => 100,
type => 'RIAK_PROFILE',
},
},
@@ -74,7 +74,7 @@ my %definition_for = (
id => 600,
name => 'RASCAL1',
description => 'rascal description',
- cdn => 1,
+ cdn => 100,
type => 'TM_PROFILE',
},
},
@@ -84,7 +84,7 @@ my %definition_for = (
id => 700,
name => 'RASCAL2',
description => 'rascal2 description',
- cdn => 2,
+ cdn => 200,
type => 'TM_PROFILE',
},
},
@@ -94,6 +94,7 @@ my %definition_for = (
id => 8,
name => 'MISC',
description => 'misc profile description',
+ type => 'UNK_PROFILE',
},
},
);
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4a1af469/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 192f011..ce9cab0 100644
--- a/traffic_ops/app/t/api/1.1/profile.t
+++ b/traffic_ops/app/t/api/1.1/profile.t
@@ -44,7 +44,8 @@ $t->get_ok("/api/1.1/profiles.json")->status_is(200)->or( sub { diag $t->tx->res
->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" )
->json_is( "/response/3/name", "MID1" )->json_is( "/response/3/description", "mid description" )
- ->json_is( "/response/4/name", "RASCAL1" )->json_is( "/response/4/description", "rascal description" );
+ ->json_is( "/response/4/name", "MISC" )->json_is( "/response/4/description", "misc profile description" )
+ ->json_is( "/response/5/name", "RASCAL1" )->json_is( "/response/5/description", "rascal description" );
$t->get_ok("/api/1.1/profiles/trimmed.json")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } );
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4a1af469/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 dc0a58e..eb5c801 100644
--- a/traffic_ops/app/t/api/1.2/profile.t
+++ b/traffic_ops/app/t/api/1.2/profile.t
@@ -39,7 +39,7 @@ ok $t->post_ok( '/login', => form => { u => Test::TestHelper::ADMIN_USER, p => T
->or( sub { diag $t->tx->res->content->asset->{content}; } ), 'Should login?';
ok $t->post_ok('/api/1.2/profiles' => {Accept => 'application/json'} => json => {
- "name" => "CCR_CREATE", "description" => "CCR_CREATE description", "cdn" => 1, "type" => 'TR_PROFILE' })->status_is(200)
+ "name" => "CCR_CREATE", "description" => "CCR_CREATE description", "cdn" => 100, "type" => 'TR_PROFILE' })->status_is(200)
->or( sub { diag $t->tx->res->content->asset->{content}; } )
->json_is( "/response/name" => "CCR_CREATE" )
->json_is( "/response/description" => "CCR_CREATE description" )
@@ -73,7 +73,7 @@ my $profile_id = &get_profile_id('CCR_CREATE');
ok $t->put_ok('/api/1.2/profiles/' . $profile_id => {Accept => 'application/json'} => json => {
"name" => "CCR_UPDATE",
"description" => "CCR_UPDATE description",
- "cdn" => 1,
+ "cdn" => 100,
"type" => "TR_PROFILE"
})
->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4a1af469/traffic_ops/app/t/profile.t
----------------------------------------------------------------------
diff --git a/traffic_ops/app/t/profile.t b/traffic_ops/app/t/profile.t
index a4947b4..23e3b96 100644
--- a/traffic_ops/app/t/profile.t
+++ b/traffic_ops/app/t/profile.t
@@ -53,7 +53,7 @@ $t->post_ok(
'/profile/create' => form => {
'profile.name' => 'JLP_Test',
'profile.description' => 'JLP Test Host',
- 'profile.cdn' => 1,
+ 'profile.cdn' => 100,
'profile.type' => 'ATS_PROFILE'
}
)->status_is(302)->or( sub { diag $t->tx->res->content->asset->{content}; } );
@@ -74,7 +74,7 @@ sub upd_and_del() {
"/profile/$id/update" => form => {
'profile.name' => 'JLP_Test',
'profile.description' => 'JLP Test Host Updated',
- 'profile.cdn' => 1,
+ 'profile.cdn' => 100,
'profile.type' => 'ATS_PROFILE'
}
)->status_is(302)->or( sub { diag $t->tx->res->content->asset->{content}; } );