aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wilmott <p@p8952.info>2015-06-24 19:07:00 +0100
committerPeter Wilmott <p@p8952.info>2015-06-24 19:07:00 +0100
commit95d97fa4b708db8186a7f13cc96c7929ce5277f6 (patch)
tree177441eb04590628d3bba14637080d1bf04d0233 /web/test/minitest_helper.rb
parentRun tests using travis (diff)
downloadruby-tinderbox-95d97fa4b708db8186a7f13cc96c7929ce5277f6.tar.gz
ruby-tinderbox-95d97fa4b708db8186a7f13cc96c7929ce5277f6.tar.bz2
ruby-tinderbox-95d97fa4b708db8186a7f13cc96c7929ce5277f6.zip
Add seed data for running tests in dev environment
Diffstat (limited to 'web/test/minitest_helper.rb')
-rw-r--r--web/test/minitest_helper.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/web/test/minitest_helper.rb b/web/test/minitest_helper.rb
index 4e4caaf..d9065b3 100644
--- a/web/test/minitest_helper.rb
+++ b/web/test/minitest_helper.rb
@@ -2,3 +2,24 @@ gem 'minitest'
require 'minitest/autorun'
require 'rack/test'
require_relative '../app'
+
+clear_packages
+package = File.read('test/test-logs/1/package').lines.each(&:strip!)
+Package.create(
+ sha1: package[0],
+ category: package[1],
+ name: package[2],
+ version: package[3],
+ revision: package[4],
+ slot: package[5],
+ identifier: package[6],
+ amd64_keyword: package[7],
+ r19_target: package[8],
+ r20_target: package[9],
+ r21_target: package[10],
+ r22_target: package[11],
+ gem_version: package[12]
+)
+update_build('test/test-logs/*/*/builds/*')
+
+MiniTest.after_run { clear_packages }