[SCM] ci-tooling packaging branch, master, updated. b3e33a5ceab3e134db21ade37f6b44c5a8d841b3
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Thu Mar 5 11:26:19 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=7d78f69
The following commit has been merged in the master branch:
commit 7d78f698687ca2dd0cf0a2c6123df36cc7d263fe
Author: Harald Sitter <sitter at kde.org>
Date: Thu Mar 5 11:54:28 2015 +0100
rubocop style fixes
---
test/test_projects.rb | 51 +++++++++++++++++++++++++++------------------------
1 file changed, 27 insertions(+), 24 deletions(-)
diff --git a/test/test_projects.rb b/test/test_projects.rb
index dd66e1d..b43f491 100644
--- a/test/test_projects.rb
+++ b/test/test_projects.rb
@@ -1,13 +1,13 @@
-require "fileutils"
-require "test/unit"
-require "tmpdir"
+require 'fileutils'
+require 'test/unit'
+require 'tmpdir'
-require_relative "../lib/projects"
+require_relative '../lib/projects'
# Mixin a prepend to overload the list_all_repos function with something testable.
module FakeProjectFactory
- def list_all_repos(component)
- return %w(kinfocenter)
+ def list_all_repos(_component)
+ %w(kinfocenter)
end
end
@@ -32,29 +32,30 @@ class ProjectTest < Test::Unit::TestCase
end
`git clone #{remotetmpdir}/tc/tn clone`
- Dir.chdir("clone") do
- FileUtils.cp_r("#{@datadir}/debian", ".")
+ Dir.chdir('clone') do
+ FileUtils.cp_r("#{@datadir}/debian", '.')
`git add *`
`git commit -m 'commitmsg'`
branches.each { |branch| `git branch #{branch}` }
`git push --all origin`
end
- FileUtils.rm_rf("clone")
+ FileUtils.rm_rf('clone')
end
- return remotetmpdir
+ remotetmpdir
end
def test_init
- name = "tn"
- component = "tc"
+ name = 'tn'
+ component = 'tc'
%w(unstable stable).each do |stability|
begin
gitrepo = create_fake_git(name: name,
component: component,
- branches: ["kubuntu_#{stability}", "kubuntu_#{stability}_yolo"])
+ branches: ["kubuntu_#{stability}",
+ "kubuntu_#{stability}_yolo"])
assert_not_nil(gitrepo)
- assert_not_equal(gitrepo, "")
+ assert_not_equal(gitrepo, '')
tmpdir = Dir.mktmpdir(self.class.to_s)
Dir.chdir(tmpdir) do
@@ -62,16 +63,17 @@ class ProjectTest < Test::Unit::TestCase
assert_equal(project.name, name)
assert_equal(project.component, component)
scm = project.upstream_scm
- assert_equal(scm.type, "git")
- assert_equal(scm.branch, "master")
- assert_equal(scm.url, "git://anongit.kde.org/#{name}")
- assert_equal(project.provided_binaries, %w(kinfocenter kinfocenter-dbg))
- assert_equal(project.dependencies, ["gwenview"])
- assert_equal(project.dependees, [])
- assert_equal(project.series_branches, ["kubuntu_#{stability}_yolo"])
- assert_equal(project.autopkgtest, false)
+ assert_equal('git', scm.type)
+ assert_equal('master', scm.branch)
+ assert_equal("git://anongit.kde.org/#{name}", scm.url)
+ assert_equal(%w(kinfocenter kinfocenter-dbg),
+ project.provided_binaries)
+ assert_equal(%w(gwenview), project.dependencies)
+ assert_equal([], project.dependees)
+ assert_equal(["kubuntu_#{stability}_yolo"], project.series_branches)
+ assert_equal(false, project.autopkgtest)
# FIXME: this is totally inconsistent with upstream_scm
- assert_equal(project.packaging_scm, "#{gitrepo}/#{component}/#{name}")
+ assert_equal("#{gitrepo}/#{component}/#{name}", project.packaging_scm)
end
ensure
FileUtils.rm_rf(tmpdir) unless tmpdir.nil?
@@ -83,7 +85,8 @@ class ProjectTest < Test::Unit::TestCase
def test_array_init_unstable
# FIXME: this still goes through git.debian
reference_projects = %w(kinfocenter gwenview)
- projects = Projects.new(type: "unstable", projects_file: "#{@datadir}/projects.json")
+ projects = Projects.new(type: 'unstable',
+ projects_file: "#{@datadir}/projects.json")
assert_not_nil(projects)
assert_equal(projects.size, reference_projects.size)
tmpref = reference_projects.clone
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list