Commit fbca30c4 authored by Marin Jankovski's avatar Marin Jankovski

Update stable branch and fix tests.

parent 8a4d0235
......@@ -28,7 +28,7 @@ GRAPH
mysql-chef_gem (>= 0.0.0)
postgresql (>= 1.0.0)
xfs (>= 0.0.0)
gitlab (0.6.9)
gitlab (0.7.0)
apt (>= 0.0.0)
database (>= 0.0.0)
magic_shell (>= 0.0.0)
......
......@@ -54,11 +54,11 @@ if node['gitlab']['env'] == "development"
default['gitlab']['shell_revision'] = "master"
else
default['gitlab']['environments'] = %w{production}
default['gitlab']['revision'] = "6-9-stable" # Must be branch, otherwise GitLab update will run on each chef run
default['gitlab']['revision'] = "7-0-stable" # Must be branch, otherwise GitLab update will run on each chef run
default['gitlab']['url'] = "http://localhost:80/"
default['gitlab']['port'] = "80"
default['gitlab']['ssh_port'] = "22"
default['gitlab']['shell_revision'] = "v1.9.4"
default['gitlab']['shell_revision'] = "v1.9.6"
end
# GitLab configuration
......
......@@ -15,7 +15,7 @@ describe "gitlab::clone" do
it "clones the gitlab repository" do
expect(chef_run).to sync_git('/home/git/gitlab').with(
repository: 'https://github.com/gitlabhq/gitlabhq.git',
revision: '6-9-stable',
revision: '7-0-stable',
user: 'git',
group: 'git'
)
......@@ -49,7 +49,7 @@ describe "gitlab::clone" do
it "clones the gitlab repository" do
expect(chef_run).to sync_git('/data/git/gitlab').with(
repository: 'https://github.com/gitlabhq/gitlabhq.git',
revision: '6-9-stable',
revision: '7-0-stable',
user: 'git',
group: 'git'
)
......@@ -69,7 +69,7 @@ describe "gitlab::clone" do
it "clones the gitlab repository" do
expect(chef_run).to sync_git('/home/git/gitlab').with(
repository: 'https://github.com/gitlabhq/gitlabhq.git',
revision: '6-9-stable',
revision: '7-0-stable',
user: 'git',
group: 'git'
)
......@@ -103,7 +103,7 @@ describe "gitlab::clone" do
it "clones the gitlab repository" do
expect(chef_run).to sync_git('/data/git/gitlab').with(
repository: 'https://github.com/gitlabhq/gitlabhq.git',
revision: '6-9-stable',
revision: '7-0-stable',
user: 'git',
group: 'git'
)
......
......@@ -14,8 +14,8 @@ describe "gitlab::default" do
before do
# stubbing commands because real commands are disabled
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.5.2.zip").and_return(true)
stub_command("git --version | grep 1.8.5.2").and_return(true)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-2.0.0.zip").and_return(true)
stub_command("git --version | grep 2.0.0").and_return(true)
stub_command("git --version >/dev/null").and_return(true)
stub_command("/usr/bin/mysql -u root -e 'show databases;'").and_return(true)
stub_command("\"/usr/bin/mysql\" -u root -e 'show databases;'").and_return(true)
......@@ -51,8 +51,8 @@ describe "gitlab::default" do
before do
# stubbing commands because real commands are disabled
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.5.2.zip").and_return(true)
stub_command("git --version | grep 1.8.5.2").and_return(true)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-2.0.0.zip").and_return(true)
stub_command("git --version | grep 2.0.0").and_return(true)
stub_command("git --version >/dev/null").and_return(true)
stub_command("/usr/bin/mysql -u root -e 'show databases;'").and_return(true)
stub_command("\"/usr/bin/mysql\" -u root -e 'show databases;'").and_return(true)
......
......@@ -13,8 +13,8 @@ describe "gitlab::git" do
end
before do
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.5.2.zip").and_return(false)
stub_command("git --version | grep 1.8.5.2").and_return(false)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-2.0.0.zip").and_return(false)
stub_command("git --version | grep 2.0.0").and_return(false)
end
it "installs all git required packages" do
......@@ -25,12 +25,12 @@ describe "gitlab::git" do
end
it 'gets the source code for git' do
expect(chef_run).to create_remote_file("#{Chef::Config['file_cache_path']}/git-1.8.5.2.zip").with(mode: 0644, source: "https://codeload.github.com/git/git/zip/v1.8.5.2")
expect(chef_run).to create_remote_file("#{Chef::Config['file_cache_path']}/git-2.0.0.zip").with(mode: 0644, source: "https://codeload.github.com/git/git/zip/v2.0.0")
end
it 'executes compiling git from source' do
resource = chef_run.find_resource(:execute, 'Extracting and Building Git 1.8.5.2 from Source')
expect(resource.command).to eq(" unzip -q git-1.8.5.2.zip\n cd git-1.8.5.2 && make prefix=/usr/local install\n")
resource = chef_run.find_resource(:execute, 'Extracting and Building Git 2.0.0 from Source')
expect(resource.command).to eq(" unzip -q git-2.0.0.zip\n cd git-2.0.0 && make prefix=/usr/local install\n")
expect(resource.cwd).to eq(Chef::Config['file_cache_path'])
end
end
......@@ -45,8 +45,8 @@ describe "gitlab::git" do
end
before do
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.5.2.zip").and_return(false)
stub_command("git --version | grep 1.8.5.2").and_return(false)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-2.0.0.zip").and_return(false)
stub_command("git --version | grep 2.0.0").and_return(false)
end
it "installs all git required packages" do
......@@ -57,12 +57,12 @@ describe "gitlab::git" do
end
it 'gets the source code for git' do
expect(chef_run).to create_remote_file("#{Chef::Config['file_cache_path']}/git-1.8.5.2.zip").with(mode: 0644, source: "https://codeload.github.com/git/git/zip/v1.8.5.2")
expect(chef_run).to create_remote_file("#{Chef::Config['file_cache_path']}/git-2.0.0.zip").with(mode: 0644, source: "https://codeload.github.com/git/git/zip/v2.0.0")
end
it 'executes compiling git from source' do
resource = chef_run.find_resource(:execute, 'Extracting and Building Git 1.8.5.2 from Source')
expect(resource.command).to eq(" unzip -q git-1.8.5.2.zip\n cd git-1.8.5.2 && make prefix=/usr/local install\n")
resource = chef_run.find_resource(:execute, 'Extracting and Building Git 2.0.0 from Source')
expect(resource.command).to eq(" unzip -q git-2.0.0.zip\n cd git-2.0.0 && make prefix=/usr/local install\n")
expect(resource.cwd).to eq(Chef::Config['file_cache_path'])
end
end
......
......@@ -15,7 +15,7 @@ describe "gitlab::gitlab_shell_clone" do
it "clones the gitlab-shell repository" do
expect(chef_run).to sync_git('/home/git/gitlab-shell').with(
repository: 'https://github.com/gitlabhq/gitlab-shell.git',
revision: "v1.9.4",
revision: "v1.9.6",
user: 'git',
group: 'git'
)
......@@ -64,7 +64,7 @@ describe "gitlab::gitlab_shell_clone" do
it "clones the gitlab-shell repository" do
expect(chef_run).to sync_git('/home/git/gitlab-shell').with(
repository: 'https://github.com/gitlabhq/gitlab-shell.git',
revision: "v1.9.4",
revision: "v1.9.6",
user: 'git',
group: 'git'
)
......
......@@ -10,8 +10,8 @@ describe "gitlab::packages" do
before do
# stubbing git commands because packages recipe requires gitlab::git
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.5.2.zip").and_return(true)
stub_command("git --version | grep 1.8.5.2").and_return(true)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-2.0.0.zip").and_return(true)
stub_command("git --version | grep 2.0.0").and_return(true)
stub_command("git --version >/dev/null").and_return(true)
end
......@@ -42,8 +42,8 @@ describe "gitlab::packages" do
before do
# stubbing git commands because packages recipe requires gitlab::git
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.5.2.zip").and_return(true)
stub_command("git --version | grep 1.8.5.2").and_return(true)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-2.0.0.zip").and_return(true)
stub_command("git --version | grep 2.0.0").and_return(true)
stub_command("git --version >/dev/null").and_return(true)
end
......
......@@ -19,8 +19,8 @@ describe "gitlab::setup" do
before do
# stubbing commands because real commands are disabled
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.5.2.zip").and_return(true)
stub_command("git --version | grep 1.8.5.2").and_return(true)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-2.0.0.zip").and_return(true)
stub_command("git --version | grep 2.0.0").and_return(true)
stub_command("git --version >/dev/null").and_return(true)
stub_command("/usr/bin/mysql -u root -e 'show databases;'").and_return(true)
stub_command("\"/usr/bin/mysql\" -u root -e 'show databases;'").and_return(true)
......@@ -89,8 +89,8 @@ describe "gitlab::setup" do
before do
# stubbing commands because real commands are disabled
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.5.2.zip").and_return(true)
stub_command("git --version | grep 1.8.5.2").and_return(true)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-2.0.0.zip").and_return(true)
stub_command("git --version | grep 2.0.0").and_return(true)
stub_command("git --version >/dev/null").and_return(true)
stub_command("/usr/bin/mysql -u root -e 'show databases;'").and_return(true)
stub_command("\"/usr/bin/mysql\" -u root -e 'show databases;'").and_return(true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment