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:50 UTC

[35/40] incubator-trafficcontrol git commit: fixed the cdn test case

fixed the cdn 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/491d5953
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/491d5953
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/491d5953

Branch: refs/heads/psql-rebase
Commit: 491d5953aad5402cafb5a8875ccb3d04396a8b83
Parents: 50154c9
Author: Dewayne Richardson <de...@apache.org>
Authored: Thu Nov 17 16:16:50 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Mon Nov 21 12:04:10 2016 -0700

----------------------------------------------------------------------
 traffic_ops/app/t/api/1.2/cdn.t | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/491d5953/traffic_ops/app/t/api/1.2/cdn.t
----------------------------------------------------------------------
diff --git a/traffic_ops/app/t/api/1.2/cdn.t b/traffic_ops/app/t/api/1.2/cdn.t
index a357f03..aed0845 100644
--- a/traffic_ops/app/t/api/1.2/cdn.t
+++ b/traffic_ops/app/t/api/1.2/cdn.t
@@ -29,18 +29,19 @@ use Test::TestHelper;
 BEGIN { $ENV{MOJO_MODE} = "test" }
 
 my $schema = Schema->connect_to_database;
+my $schema_values = { schema => $schema, no_transactions => 1 };
 my $dbh    = Schema->database_handle;
 my $t      = Test::Mojo->new('TrafficOps');
 
 Test::TestHelper->unload_core_data($schema);
-Test::TestHelper->load_core_data($schema);
+Test::TestHelper->load_all_fixtures( Fixtures::Role->new($schema_values) );
+Test::TestHelper->load_all_fixtures( Fixtures::TmUser->new($schema_values) );
 
 ok $t->post_ok( '/login', => form => { u => Test::TestHelper::ADMIN_USER, p => Test::TestHelper::ADMIN_USER_PASSWORD } )->status_is(302)
 	->or( sub { diag $t->tx->res->content->asset->{content}; } ), 'Should login?';
 
 ok $t->post_ok('/api/1.2/cdns' => {Accept => 'application/json'} => json => {
-        "name" => "cdn_test"
-        })
+        "name" => "cdn_test", "dnssecEnabled" => "true" })
     ->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )
     ->json_is( "/response/name" => "cdn_test" )
     ->json_is( "/alerts/0/level" => "success" )
@@ -50,7 +51,7 @@ ok $t->post_ok('/api/1.2/cdns' => {Accept => 'application/json'} => json => {
 my $cdn_id = &get_cdn_id('cdn_test');
 
 ok $t->put_ok('/api/1.2/cdns/' . $cdn_id  => {Accept => 'application/json'} => json => {
-        "name" => "cdn_test2"
+        "name" => "cdn_test2", "dnssecEnabled" => "true"
         })
     ->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )
     ->json_is( "/response/name" => "cdn_test2" )