From 1ebe52ef9963391f13b406c843c8f475668f173c Mon Sep 17 00:00:00 2001 From: Phil Pham Date: Fri, 14 Feb 2014 11:16:15 -0800 Subject: add beaker-rspec support This adds support for beaker-rspec as well as basic test coverage for git --- spec/acceptance/files/create_git_repo.sh | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 spec/acceptance/files/create_git_repo.sh (limited to 'spec/acceptance/files/create_git_repo.sh') diff --git a/spec/acceptance/files/create_git_repo.sh b/spec/acceptance/files/create_git_repo.sh new file mode 100755 index 0000000..03c4f44 --- /dev/null +++ b/spec/acceptance/files/create_git_repo.sh @@ -0,0 +1,36 @@ +#!/bin/bash +mkdir testrepo +cd testrepo + +touch file1.txt file2.txt file3.txt +git init +echo 'change 1' > file1.txt +git add file1.txt +git tag 0.0.1 +git commit -m 'add file1' +echo 'change 2' > file2.txt +git add file2.txt +git tag 0.0.2 +git commit -m 'add file2' +echo 'change 3' > file3.txt +git add file3.txt +git commit -m 'add file3' +git tag 0.0.3 + +git checkout -b a_branch +echo 'change 4' > file4.txt +git add file4.txt +git commit -m 'add file4' +echo 'change 5' > file5.txt +git add file5.txt +git commit -m 'add file5' +echo 'change 6' > file6.txt +git add file6.txt +git commit -m 'add file6' + +git checkout master +cd .. + +git --git-dir=testrepo/.git config core.bare true +cp -r testrepo/.git testrepo.git +rm -rf testrepo -- cgit v1.2.3 From bca6ff5c480d4aa129766ccac4cb385aef092fd9 Mon Sep 17 00:00:00 2001 From: John Duarte Date: Mon, 5 May 2014 14:02:51 -0700 Subject: Add spec for clone protocols skeleton The git_clone_protocols_spec.rb will be used to enumerate over the available protocols for git to use to clone to disk. The initial skeleton includes the 'file://' protocol test as well as support key files to be used later. --- spec/acceptance/files/create_git_repo.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'spec/acceptance/files/create_git_repo.sh') diff --git a/spec/acceptance/files/create_git_repo.sh b/spec/acceptance/files/create_git_repo.sh index 03c4f44..87b00a4 100755 --- a/spec/acceptance/files/create_git_repo.sh +++ b/spec/acceptance/files/create_git_repo.sh @@ -34,3 +34,4 @@ cd .. git --git-dir=testrepo/.git config core.bare true cp -r testrepo/.git testrepo.git rm -rf testrepo +touch testrepo.git/git-daemon-export-ok -- cgit v1.2.3 From 2e8cc51403ead784e9764bb25d15d8a30d8d6475 Mon Sep 17 00:00:00 2001 From: John Duarte Date: Tue, 6 May 2014 08:55:51 -0700 Subject: Add test for git clone using http --- spec/acceptance/files/create_git_repo.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spec/acceptance/files/create_git_repo.sh') diff --git a/spec/acceptance/files/create_git_repo.sh b/spec/acceptance/files/create_git_repo.sh index 87b00a4..40f341a 100755 --- a/spec/acceptance/files/create_git_repo.sh +++ b/spec/acceptance/files/create_git_repo.sh @@ -34,4 +34,6 @@ cd .. git --git-dir=testrepo/.git config core.bare true cp -r testrepo/.git testrepo.git rm -rf testrepo -touch testrepo.git/git-daemon-export-ok +cd testrepo.git +touch git-daemon-export-ok +git update-server-info -- cgit v1.2.3 From 521d321181c95eb042c23c8277e79cfe1d066117 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 27 May 2014 12:41:31 -0700 Subject: Update tests for ubuntu 14.04 In ubuntu 14.04 git 1.9.1 is the default version, and 1.9+ fatally fail if the user.email and user.name are not set (previously it would just warn). This commit sets those up so the tests will actually run. --- spec/acceptance/files/create_git_repo.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/acceptance/files/create_git_repo.sh') diff --git a/spec/acceptance/files/create_git_repo.sh b/spec/acceptance/files/create_git_repo.sh index 40f341a..b5e930c 100755 --- a/spec/acceptance/files/create_git_repo.sh +++ b/spec/acceptance/files/create_git_repo.sh @@ -6,12 +6,12 @@ touch file1.txt file2.txt file3.txt git init echo 'change 1' > file1.txt git add file1.txt -git tag 0.0.1 git commit -m 'add file1' +git tag 0.0.1 echo 'change 2' > file2.txt git add file2.txt -git tag 0.0.2 git commit -m 'add file2' +git tag 0.0.2 echo 'change 3' > file3.txt git add file3.txt git commit -m 'add file3' -- cgit v1.2.3