summaryrefslogtreecommitdiff
path: root/spec/support/gitlab_stubs
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-09 13:37:50 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-09 13:37:50 +0200
commit76c6aeb9bc9855e9a65bb08db862e92ac923255e (patch)
tree3494f9854f8f9e2c14f909c7132691f652d13ebc /spec/support/gitlab_stubs
parent3d6fed54f0dc551d8c7ba9a03f4dfbd2203552b5 (diff)
downloadgitlab-ce-76c6aeb9bc9855e9a65bb08db862e92ac923255e.tar.gz
Merge CI factories and CI spec/support with GitLab
Diffstat (limited to 'spec/support/gitlab_stubs')
-rw-r--r--spec/support/gitlab_stubs/gitlab_ci.yml63
-rw-r--r--spec/support/gitlab_stubs/project_8.json45
-rw-r--r--spec/support/gitlab_stubs/project_8_hooks.json1
-rw-r--r--spec/support/gitlab_stubs/projects.json1
-rw-r--r--spec/support/gitlab_stubs/raw_project.yml36
-rw-r--r--spec/support/gitlab_stubs/session.json20
-rw-r--r--spec/support/gitlab_stubs/user.json20
7 files changed, 186 insertions, 0 deletions
diff --git a/spec/support/gitlab_stubs/gitlab_ci.yml b/spec/support/gitlab_stubs/gitlab_ci.yml
new file mode 100644
index 00000000000..3482145404e
--- /dev/null
+++ b/spec/support/gitlab_stubs/gitlab_ci.yml
@@ -0,0 +1,63 @@
+image: ruby:2.1
+services:
+ - postgres
+
+before_script:
+ - gem install bundler
+ - bundle install
+ - bundle exec rake db:create
+
+variables:
+ DB_NAME: postgres
+
+types:
+ - test
+ - deploy
+ - notify
+
+rspec:
+ script: "rake spec"
+ tags:
+ - ruby
+ - postgres
+ only:
+ - branches
+
+spinach:
+ script: "rake spinach"
+ allow_failure: true
+ tags:
+ - ruby
+ - mysql
+ except:
+ - tags
+
+staging:
+ script: "cap deploy stating"
+ type: deploy
+ tags:
+ - capistrano
+ - debian
+ except:
+ - stable
+
+production:
+ type: deploy
+ script:
+ - cap deploy production
+ - cap notify
+ tags:
+ - capistrano
+ - debian
+ only:
+ - master
+ - /^deploy-.*$/
+
+dockerhub:
+ type: notify
+ script: "curl http://dockerhub/URL"
+ tags:
+ - ruby
+ - postgres
+ only:
+ - branches
diff --git a/spec/support/gitlab_stubs/project_8.json b/spec/support/gitlab_stubs/project_8.json
new file mode 100644
index 00000000000..f0a9fce859c
--- /dev/null
+++ b/spec/support/gitlab_stubs/project_8.json
@@ -0,0 +1,45 @@
+{
+ "id":8,
+ "description":"ssh access and repository management app for GitLab",
+ "default_branch":"master",
+ "public":false,
+ "visibility_level":0,
+ "ssh_url_to_repo":"git@demo.gitlab.com:gitlab/gitlab-shell.git",
+ "http_url_to_repo":"http://demo.gitlab.com/gitlab/gitlab-shell.git",
+ "web_url":"http://demo.gitlab.com/gitlab/gitlab-shell",
+ "owner": {
+ "id":4,
+ "name":"GitLab",
+ "created_at":"2012-12-21T13:03:05Z"
+ },
+ "name":"gitlab-shell",
+ "name_with_namespace":"GitLab / gitlab-shell",
+ "path":"gitlab-shell",
+ "path_with_namespace":"gitlab/gitlab-shell",
+ "issues_enabled":true,
+ "merge_requests_enabled":true,
+ "wall_enabled":false,
+ "wiki_enabled":true,
+ "snippets_enabled":false,
+ "created_at":"2013-03-20T13:28:53Z",
+ "last_activity_at":"2013-11-30T00:11:17Z",
+ "namespace":{
+ "created_at":"2012-12-21T13:03:05Z",
+ "description":"Self hosted Git management software",
+ "id":4,
+ "name":"GitLab",
+ "owner_id":1,
+ "path":"gitlab",
+ "updated_at":"2013-03-20T13:29:13Z"
+ },
+ "permissions":{
+ "project_access": {
+ "access_level": 10,
+ "notification_level": 3
+ },
+ "group_access": {
+ "access_level": 50,
+ "notification_level": 3
+ }
+ }
+} \ No newline at end of file
diff --git a/spec/support/gitlab_stubs/project_8_hooks.json b/spec/support/gitlab_stubs/project_8_hooks.json
new file mode 100644
index 00000000000..93d51406d63
--- /dev/null
+++ b/spec/support/gitlab_stubs/project_8_hooks.json
@@ -0,0 +1 @@
+[{}]
diff --git a/spec/support/gitlab_stubs/projects.json b/spec/support/gitlab_stubs/projects.json
new file mode 100644
index 00000000000..ca42c14c5d8
--- /dev/null
+++ b/spec/support/gitlab_stubs/projects.json
@@ -0,0 +1 @@
+[{"id":3,"description":"GitLab is open source software to collaborate on code. Create projects and repositories, manage access and do code reviews.","default_branch":"master","public":true,"visibility_level":20,"ssh_url_to_repo":"git@demo.gitlab.com:gitlab/gitlabhq.git","http_url_to_repo":"http://demo.gitlab.com/gitlab/gitlabhq.git","web_url":"http://demo.gitlab.com/gitlab/gitlabhq","owner":{"id":4,"name":"GitLab","created_at":"2012-12-21T13:03:05Z"},"name":"gitlabhq","name_with_namespace":"GitLab / gitlabhq","path":"gitlabhq","path_with_namespace":"gitlab/gitlabhq","issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":true,"wiki_enabled":true,"snippets_enabled":true,"created_at":"2012-12-21T13:06:34Z","last_activity_at":"2013-12-02T19:10:10Z","namespace":{"created_at":"2012-12-21T13:03:05Z","description":"Self hosted Git management software","id":4,"name":"GitLab","owner_id":1,"path":"gitlab","updated_at":"2013-03-20T13:29:13Z"}},{"id":4,"description":"Component of GitLab CI. Web application","default_branch":"master","public":false,"visibility_level":0,"ssh_url_to_repo":"git@demo.gitlab.com:gitlab/gitlab-ci.git","http_url_to_repo":"http://demo.gitlab.com/gitlab/gitlab-ci.git","web_url":"http://demo.gitlab.com/gitlab/gitlab-ci","owner":{"id":4,"name":"GitLab","created_at":"2012-12-21T13:03:05Z"},"name":"gitlab-ci","name_with_namespace":"GitLab / gitlab-ci","path":"gitlab-ci","path_with_namespace":"gitlab/gitlab-ci","issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":true,"wiki_enabled":true,"snippets_enabled":true,"created_at":"2012-12-21T13:06:50Z","last_activity_at":"2013-11-28T19:26:54Z","namespace":{"created_at":"2012-12-21T13:03:05Z","description":"Self hosted Git management software","id":4,"name":"GitLab","owner_id":1,"path":"gitlab","updated_at":"2013-03-20T13:29:13Z"}},{"id":5,"description":"","default_branch":"master","public":true,"visibility_level":20,"ssh_url_to_repo":"git@demo.gitlab.com:gitlab/gitlab-recipes.git","http_url_to_repo":"http://demo.gitlab.com/gitlab/gitlab-recipes.git","web_url":"http://demo.gitlab.com/gitlab/gitlab-recipes","owner":{"id":4,"name":"GitLab","created_at":"2012-12-21T13:03:05Z"},"name":"gitlab-recipes","name_with_namespace":"GitLab / gitlab-recipes","path":"gitlab-recipes","path_with_namespace":"gitlab/gitlab-recipes","issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":true,"wiki_enabled":true,"snippets_enabled":true,"created_at":"2012-12-21T13:07:02Z","last_activity_at":"2013-12-02T13:54:10Z","namespace":{"created_at":"2012-12-21T13:03:05Z","description":"Self hosted Git management software","id":4,"name":"GitLab","owner_id":1,"path":"gitlab","updated_at":"2013-03-20T13:29:13Z"}},{"id":8,"description":"ssh access and repository management app for GitLab","default_branch":"master","public":false,"visibility_level":0,"ssh_url_to_repo":"git@demo.gitlab.com:gitlab/gitlab-shell.git","http_url_to_repo":"http://demo.gitlab.com/gitlab/gitlab-shell.git","web_url":"http://demo.gitlab.com/gitlab/gitlab-shell","owner":{"id":4,"name":"GitLab","created_at":"2012-12-21T13:03:05Z"},"name":"gitlab-shell","name_with_namespace":"GitLab / gitlab-shell","path":"gitlab-shell","path_with_namespace":"gitlab/gitlab-shell","issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":false,"wiki_enabled":true,"snippets_enabled":false,"created_at":"2013-03-20T13:28:53Z","last_activity_at":"2013-11-30T00:11:17Z","namespace":{"created_at":"2012-12-21T13:03:05Z","description":"Self hosted Git management software","id":4,"name":"GitLab","owner_id":1,"path":"gitlab","updated_at":"2013-03-20T13:29:13Z"}},{"id":9,"description":null,"default_branch":"master","public":false,"visibility_level":0,"ssh_url_to_repo":"git@demo.gitlab.com:gitlab/gitlab_git.git","http_url_to_repo":"http://demo.gitlab.com/gitlab/gitlab_git.git","web_url":"http://demo.gitlab.com/gitlab/gitlab_git","owner":{"id":4,"name":"GitLab","created_at":"2012-12-21T13:03:05Z"},"name":"gitlab_git","name_with_namespace":"GitLab / gitlab_git","path":"gitlab_git","path_with_namespace":"gitlab/gitlab_git","issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":false,"wiki_enabled":true,"snippets_enabled":false,"created_at":"2013-04-28T19:15:08Z","last_activity_at":"2013-12-02T13:07:13Z","namespace":{"created_at":"2012-12-21T13:03:05Z","description":"Self hosted Git management software","id":4,"name":"GitLab","owner_id":1,"path":"gitlab","updated_at":"2013-03-20T13:29:13Z"}},{"id":10,"description":"ultra lite authorization library http://randx.github.com/six/\\r\\n ","default_branch":"master","public":true,"visibility_level":20,"ssh_url_to_repo":"git@demo.gitlab.com:sandbox/six.git","http_url_to_repo":"http://demo.gitlab.com/sandbox/six.git","web_url":"http://demo.gitlab.com/sandbox/six","owner":{"id":8,"name":"Sandbox","created_at":"2013-08-01T16:44:17Z"},"name":"Six","name_with_namespace":"Sandbox / Six","path":"six","path_with_namespace":"sandbox/six","issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":false,"wiki_enabled":true,"snippets_enabled":false,"created_at":"2013-08-01T16:45:02Z","last_activity_at":"2013-11-29T11:30:56Z","namespace":{"created_at":"2013-08-01T16:44:17Z","description":"","id":8,"name":"Sandbox","owner_id":1,"path":"sandbox","updated_at":"2013-08-01T16:44:17Z"}},{"id":11,"description":"Simple HTML5 Charts using the <canvas> tag ","default_branch":"master","public":false,"visibility_level":0,"ssh_url_to_repo":"git@demo.gitlab.com:sandbox/charts-js.git","http_url_to_repo":"http://demo.gitlab.com/sandbox/charts-js.git","web_url":"http://demo.gitlab.com/sandbox/charts-js","owner":{"id":8,"name":"Sandbox","created_at":"2013-08-01T16:44:17Z"},"name":"Charts.js","name_with_namespace":"Sandbox / Charts.js","path":"charts-js","path_with_namespace":"sandbox/charts-js","issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":false,"wiki_enabled":true,"snippets_enabled":false,"created_at":"2013-08-01T16:47:29Z","last_activity_at":"2013-12-02T15:18:11Z","namespace":{"created_at":"2013-08-01T16:44:17Z","description":"","id":8,"name":"Sandbox","owner_id":1,"path":"sandbox","updated_at":"2013-08-01T16:44:17Z"}},{"id":13,"description":"","default_branch":"master","public":false,"visibility_level":0,"ssh_url_to_repo":"git@demo.gitlab.com:sandbox/afro.git","http_url_to_repo":"http://demo.gitlab.com/sandbox/afro.git","web_url":"http://demo.gitlab.com/sandbox/afro","owner":{"id":8,"name":"Sandbox","created_at":"2013-08-01T16:44:17Z"},"name":"Afro","name_with_namespace":"Sandbox / Afro","path":"afro","path_with_namespace":"sandbox/afro","issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":false,"wiki_enabled":true,"snippets_enabled":false,"created_at":"2013-11-14T17:45:19Z","last_activity_at":"2013-12-02T17:41:45Z","namespace":{"created_at":"2013-08-01T16:44:17Z","description":"","id":8,"name":"Sandbox","owner_id":1,"path":"sandbox","updated_at":"2013-08-01T16:44:17Z"}}] \ No newline at end of file
diff --git a/spec/support/gitlab_stubs/raw_project.yml b/spec/support/gitlab_stubs/raw_project.yml
new file mode 100644
index 00000000000..df2ce223d1f
--- /dev/null
+++ b/spec/support/gitlab_stubs/raw_project.yml
@@ -0,0 +1,36 @@
+--- !ruby/object:OpenStruct
+table:
+ :id: 189
+ :description: Website at http://api.gitlab.org/
+ :default_branch: master
+ :public: false
+ :visibility_level: 0
+ :ssh_url_to_repo: dzaporozhets@localhost:gitlab/api-gitlab-org.git
+ :http_url_to_repo: http://localhost:3000/gitlab/api-gitlab-org.git
+ :web_url: http://localhost:3000/gitlab/api-gitlab-org
+ :owner:
+ id: 1
+ name: GitLab
+ created_at: '2012-10-03T09:59:57.000Z'
+ :name: api.gitlab.org
+ :name_with_namespace: GitLab / api.gitlab.org
+ :path: api-gitlab-org
+ :path_with_namespace: gitlab/api-gitlab-org
+ :issues_enabled: true
+ :merge_requests_enabled: true
+ :wall_enabled: false
+ :wiki_enabled: false
+ :snippets_enabled: false
+ :created_at: '2013-06-06T12:29:39.000Z'
+ :last_activity_at: '2013-12-06T20:29:42.000Z'
+ :namespace:
+ id: 1
+ name: GitLab
+ path: gitlab
+ owner_id: 1
+ created_at: '2012-10-03T09:59:57.000Z'
+ updated_at: '2014-01-28T08:49:53.000Z'
+ description: Self hosted Git management software
+ avatar:
+ url: /uploads/group/avatar/1/0-vader-profile.jpg
+
diff --git a/spec/support/gitlab_stubs/session.json b/spec/support/gitlab_stubs/session.json
new file mode 100644
index 00000000000..ce8dfe5ae75
--- /dev/null
+++ b/spec/support/gitlab_stubs/session.json
@@ -0,0 +1,20 @@
+{
+ "id":2,
+ "username":"jsmith",
+ "email":"test@test.com",
+ "name":"John Smith",
+ "bio":"",
+ "skype":"aertert",
+ "linkedin":"",
+ "twitter":"",
+ "theme_id":2,"color_scheme_id":2,
+ "state":"active",
+ "created_at":"2012-12-21T13:02:20Z",
+ "extern_uid":null,
+ "provider":null,
+ "is_admin":false,
+ "can_create_group":false,
+ "can_create_project":false,
+ "private_token":"Wvjy2Krpb7y8xi93owUz",
+ "access_token":"Wvjy2Krpb7y8xi93owUz"
+} \ No newline at end of file
diff --git a/spec/support/gitlab_stubs/user.json b/spec/support/gitlab_stubs/user.json
new file mode 100644
index 00000000000..ce8dfe5ae75
--- /dev/null
+++ b/spec/support/gitlab_stubs/user.json
@@ -0,0 +1,20 @@
+{
+ "id":2,
+ "username":"jsmith",
+ "email":"test@test.com",
+ "name":"John Smith",
+ "bio":"",
+ "skype":"aertert",
+ "linkedin":"",
+ "twitter":"",
+ "theme_id":2,"color_scheme_id":2,
+ "state":"active",
+ "created_at":"2012-12-21T13:02:20Z",
+ "extern_uid":null,
+ "provider":null,
+ "is_admin":false,
+ "can_create_group":false,
+ "can_create_project":false,
+ "private_token":"Wvjy2Krpb7y8xi93owUz",
+ "access_token":"Wvjy2Krpb7y8xi93owUz"
+} \ No newline at end of file