[SCM] ci-tooling packaging branch, master, updated. 54527f18200dcb19de9e39995c7a244dc199b791
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Wed Oct 28 14:18:18 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=54527f1
The following commit has been merged in the master branch:
commit 54527f18200dcb19de9e39995c7a244dc199b791
Author: Harald Sitter <sitter at kde.org>
Date: Wed Oct 28 15:18:15 2015 +0100
test that autoupdate's timestamp is within margin and doesn't update again
---
test/test_apt.rb | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/test/test_apt.rb b/test/test_apt.rb
index 977f0b5..136de37 100644
--- a/test/test_apt.rb
+++ b/test/test_apt.rb
@@ -95,11 +95,20 @@ class AptTest < TestCase
default_args + %w(install abc)]) do
Apt.install('abc')
end
+ ## Make sure the time stamp difference after the run is <60s and
+ ## a subsequent run doesn't update again.
+ t = Apt::Abstrapt.send(:instance_variable_get, :@last_update)
+ assert(Time.now - t < 60)
+ assert_system_default(%w(install def)) do
+ Apt.install(%w(def))
+ end
+
# Doesn't update if recent
Apt::Abstrapt.send(:instance_variable_set, :@last_update, Time.now)
assert_system([default_args + %w(install abc)]) do
Apt.install('abc')
end
+
# Doesn't update if update
Apt::Abstrapt.send(:instance_variable_set, :@last_update, nil)
assert_system([default_args + ['update']]) do
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list