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/19 15:37:22 UTC
[1/2] incubator-trafficcontrol git commit: This closes #484
Repository: incubator-trafficcontrol
Updated Branches:
refs/heads/master 23b4f79fa -> 2853a5e9e
This closes #484
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/2853a5e9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/2853a5e9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/2853a5e9
Branch: refs/heads/master
Commit: 2853a5e9e754f4cb40c2a92e7c0246243bcdebbb
Parents: e7155a2
Author: Dewayne Richardson <de...@apache.org>
Authored: Wed Apr 19 09:37:14 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Wed Apr 19 09:37:14 2017 -0600
----------------------------------------------------------------------
----------------------------------------------------------------------
[2/2] incubator-trafficcontrol git commit: loads log fixture data
outside of the core
Posted by de...@apache.org.
loads log fixture data outside of the core
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/e7155a27
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/e7155a27
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/e7155a27
Branch: refs/heads/master
Commit: e7155a27b8ebb7a361e255e915775bf03da6fd9b
Parents: 23b4f79
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Wed Apr 19 09:27:22 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Wed Apr 19 09:37:14 2017 -0600
----------------------------------------------------------------------
traffic_ops/app/lib/Test/TestHelper.pm | 2 --
traffic_ops/app/t/api/1.2/log.t | 5 +++++
2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e7155a27/traffic_ops/app/lib/Test/TestHelper.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Test/TestHelper.pm b/traffic_ops/app/lib/Test/TestHelper.pm
index c18c301..ae34ffa 100644
--- a/traffic_ops/app/lib/Test/TestHelper.pm
+++ b/traffic_ops/app/lib/Test/TestHelper.pm
@@ -138,7 +138,6 @@ sub load_core_data {
$self->load_all_fixtures( Fixtures::JobStatus->new($schema_values) );
$self->load_all_fixtures( Fixtures::JobAgent->new($schema_values) );
$self->load_all_fixtures( Fixtures::Job->new($schema_values) );
- $self->load_all_fixtures( Fixtures::Log->new($schema_values) );
}
sub unload_core_data {
@@ -147,7 +146,6 @@ sub unload_core_data {
$self->teardown($schema, 'ToExtension');
$self->teardown($schema, 'Staticdnsentry');
- $self->teardown($schema, 'Log');
$self->teardown($schema, 'Job');
$self->teardown($schema, 'JobAgent');
$self->teardown($schema, 'JobStatus');
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e7155a27/traffic_ops/app/t/api/1.2/log.t
----------------------------------------------------------------------
diff --git a/traffic_ops/app/t/api/1.2/log.t b/traffic_ops/app/t/api/1.2/log.t
index d62ddb8..3ec2f8a 100644
--- a/traffic_ops/app/t/api/1.2/log.t
+++ b/traffic_ops/app/t/api/1.2/log.t
@@ -40,8 +40,13 @@ my $count_response = sub {
return $t->success( is( scalar(@$r), $count ) );
};
+#unload data for a clean test
Test::TestHelper->unload_core_data($schema);
+Test::TestHelper->teardown( $schema, 'Log' );
+
+#load test data
Test::TestHelper->load_core_data($schema);
+Test::TestHelper->load_all_fixtures( Fixtures::Log->new( { schema => $schema, no_transactions => 1 } ) );
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?';