Skip to content
This repository was archived by the owner on May 12, 2018. It is now read-only.

Commit e03b796

Browse files
committed
Merge branch 'adapt_test_to_new_repo' into 'master'
Adapt the tests to the latest gitlab-git-test repo See merge request !10
2 parents cba8de9 + 6838748 commit e03b796

File tree

9 files changed

+24
-20
lines changed

9 files changed

+24
-20
lines changed

spec/commit_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
commits.map { |c| c.id }
184184
end
185185

186-
it { should have(15).elements }
186+
it { should have(16).elements }
187187
it { should include(SeedRepo::Commit::ID) }
188188
it { should include(SeedRepo::Commit::PARENT_ID) }
189189
it { should include(SeedRepo::FirstCommit::ID) }
@@ -201,7 +201,7 @@
201201
commits.map { |c| c.id }
202202
end
203203

204-
it { should have(12).elements }
204+
it { should have(13).elements }
205205
it { should include(SeedRepo::Commit::ID) }
206206
it { should include(SeedRepo::FirstCommit::ID) }
207207
it { should_not include(SeedRepo::LastCommit::ID) }

spec/diff_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
deleted_file: false,
2626
}
2727

28-
@rugged_diff = repository.rugged.diff("master^", "master", paths:
28+
@rugged_diff = repository.rugged.diff("5937ac0a7beb003549fc5fd26fc247adbce4a52e^", "5937ac0a7beb003549fc5fd26fc247adbce4a52e", paths:
2929
[".gitmodules"]).patches.first
3030
end
3131

spec/repository_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@
5858

5959
it { should be_kind_of Array }
6060
it { should have(SeedRepo::Repo::TAGS.size).elements }
61-
its(:last) { should == "v1.1.0" }
61+
its(:last) { should == "v1.2.0" }
6262
it { should include("v1.0.0") }
6363
it { should_not include("v5.0.0") }
6464
end
6565

6666
shared_examples 'archive check' do |extenstion|
67-
it { archive.should match(/tmp\/gitlab-git-test.git\/gitlab-git-test-5937ac0a/) }
67+
it { archive.should match(/tmp\/gitlab-git-test.git\/gitlab-git-test-eb49186cfa5c43380/) }
6868
it { archive.should end_with extenstion }
6969
it { File.exists?(archive).should be_true }
7070
it { File.size?(archive).should_not be_nil }
@@ -138,7 +138,7 @@
138138

139139
it { should be_kind_of Array }
140140
its(:first) { should == 'feature' }
141-
its(:last) { should == 'v1.1.0' }
141+
its(:last) { should == 'v1.2.0' }
142142
end
143143

144144
describe :search_files do
@@ -181,12 +181,12 @@
181181
end
182182

183183
describe :commit_count do
184-
it { repository.commit_count("master").should == 13 }
184+
it { repository.commit_count("master").should == 14 }
185185
it { repository.commit_count("feature").should == 9 }
186186
end
187187

188188
describe :archive_repo do
189-
it { repository.archive_repo('master', '/tmp').should == '/tmp/gitlab-git-test.git/gitlab-git-test-5937ac0a7beb003549fc5fd26fc247adbce4a52e.tar.gz' }
189+
it { repository.archive_repo('master', '/tmp').should == '/tmp/gitlab-git-test.git/gitlab-git-test-eb49186cfa5c4338011f5f590fac11bd66c5c631.tar.gz' }
190190
end
191191

192192
describe "#reset" do
@@ -212,7 +212,7 @@
212212
end
213213

214214
@normal_repo = Gitlab::Git::Repository.new(TEST_NORMAL_REPO_PATH)
215-
@normal_repo.reset("HEAD~3", :hard)
215+
@normal_repo.reset("HEAD~4", :hard)
216216
end
217217

218218
it "should replace the working directory with the content of the index" do

spec/support/big_commit.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Seed repo:
2+
# eb49186cfa5c4338011f5f590fac11bd66c5c631 Add submodules nested deeper than the root
23
# 5937ac0a7beb003549fc5fd26fc247adbce4a52e Add submodule from gitlab.com
34
# 570e7b2abdd848b95f2f578043fc23bd6f6fd24d Change some files
45
# 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 More submodules

spec/support/commit.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Seed repo:
2+
# eb49186cfa5c4338011f5f590fac11bd66c5c631 Add submodules nested deeper than the root
23
# 5937ac0a7beb003549fc5fd26fc247adbce4a52e Add submodule from gitlab.com
34
# 570e7b2abdd848b95f2f578043fc23bd6f6fd24d Change some files
45
# 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 More submodules

spec/support/first_commit.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Seed repo:
2+
# eb49186cfa5c4338011f5f590fac11bd66c5c631 Add submodules nested deeper than the root
23
# 5937ac0a7beb003549fc5fd26fc247adbce4a52e Add submodule from gitlab.com
34
# 570e7b2abdd848b95f2f578043fc23bd6f6fd24d Change some files
45
# 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 More submodules

spec/support/last_commit.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Seed repo:
2+
# eb49186cfa5c4338011f5f590fac11bd66c5c631 Add submodules nested deeper than the root
23
# 5937ac0a7beb003549fc5fd26fc247adbce4a52e Add submodule from gitlab.com
34
# 570e7b2abdd848b95f2f578043fc23bd6f6fd24d Change some files
45
# 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 More submodules
@@ -15,11 +16,11 @@
1516
#
1617
module SeedRepo
1718
module LastCommit
18-
ID = "5937ac0a7beb003549fc5fd26fc247adbce4a52e"
19-
PARENT_ID = "570e7b2abdd848b95f2f578043fc23bd6f6fd24d"
20-
MESSAGE = "Add submodule from gitlab.com"
21-
AUTHOR_FULL_NAME = "Dmitriy Zaporozhets"
22-
FILES = [".gitmodules", "gitlab-grack"]
23-
FILES_COUNT = 2
19+
ID = "eb49186cfa5c4338011f5f590fac11bd66c5c631"
20+
PARENT_ID = "5937ac0a7beb003549fc5fd26fc247adbce4a52e"
21+
MESSAGE = "Add submodules nested deeper than the root"
22+
AUTHOR_FULL_NAME = "Jacob Vosmaer"
23+
FILES = [".gitmodules", "deeper/nested/six", "nested/six"]
24+
FILES_COUNT = 3
2425
end
2526
end

spec/support/repo.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module SeedRepo
22
module Repo
33
HEAD = "master"
44
BRANCHES = ["feature", "fix", "master"]
5-
TAGS = ["v1.0.0", 'v1.1.0']
5+
TAGS = ["v1.0.0", 'v1.1.0', 'v1.2.0']
66
end
77
end
88

spec/tag_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
describe 'last tag' do
1515
let(:tag) { repository.tags.last }
1616

17-
it { tag.name.should == "v1.1.0" }
18-
it { tag.target.should == "8a2a6eb295bb170b34c24c76c49ed0e9b2eaf34b" }
19-
it { tag.message.should == "Version 1.1.0" }
17+
it { tag.name.should == "v1.2.0" }
18+
it { tag.target.should == "10d64eed7760f2811ee2d64b44f1f7d3b364f17b" }
19+
it { tag.message.should == "Version 1.2.0" }
2020
end
2121

22-
it { repository.tags.size.should == 2 }
22+
it { repository.tags.size.should == 3 }
2323
end

0 commit comments

Comments
 (0)