summaryrefslogtreecommitdiff
path: root/tools/functional/fixtures
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2020-09-05 00:15:04 +0200
committerNejc Habjan <nejc.habjan@siemens.com>2020-09-15 22:05:48 +0200
commit79489c775141c4ddd1f7aecae90dae8061d541fe (patch)
tree7c8f45e232049e0cad13af57e05b7ccbd8c6bb82 /tools/functional/fixtures
parent0d89a6e61bd4ae244c1545463272ef830d72dda9 (diff)
downloadgitlab-79489c775141c4ddd1f7aecae90dae8061d541fe.tar.gz
test(env): replace custom scripts with pytest and docker-compose
Diffstat (limited to 'tools/functional/fixtures')
-rw-r--r--tools/functional/fixtures/avatar.pngbin0 -> 592 bytes
-rw-r--r--tools/functional/fixtures/docker-compose.yml31
-rw-r--r--tools/functional/fixtures/set_token.rb9
3 files changed, 40 insertions, 0 deletions
diff --git a/tools/functional/fixtures/avatar.png b/tools/functional/fixtures/avatar.png
new file mode 100644
index 0000000..a3a767c
--- /dev/null
+++ b/tools/functional/fixtures/avatar.png
Binary files differ
diff --git a/tools/functional/fixtures/docker-compose.yml b/tools/functional/fixtures/docker-compose.yml
new file mode 100644
index 0000000..5dd9d90
--- /dev/null
+++ b/tools/functional/fixtures/docker-compose.yml
@@ -0,0 +1,31 @@
+version: '3'
+services:
+ gitlab:
+ image: 'gitlab/gitlab-ce:latest'
+ container_name: 'gitlab-test'
+ hostname: 'gitlab.test'
+ privileged: true # Just in case https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/1350
+ environment:
+ GITLAB_OMNIBUS_CONFIG: |
+ external_url 'http://gitlab.test'
+ gitlab_rails['initial_root_password'] = '5iveL!fe'
+ gitlab_rails['initial_shared_runners_registration_token'] = 'sTPNtWLEuSrHzoHP8oCU'
+ registry['enable'] = false
+ nginx['redirect_http_to_https'] = false
+ nginx['listen_port'] = 80
+ nginx['listen_https'] = false
+ pages_external_url 'http://pages.gitlab.lxd'
+ gitlab_pages['enable'] = true
+ gitlab_pages['inplace_chroot'] = true
+ prometheus['enable'] = false
+ alertmanager['enable'] = false
+ node_exporter['enable'] = false
+ redis_exporter['enable'] = false
+ postgres_exporter['enable'] = false
+ pgbouncer_exporter['enable'] = false
+ gitlab_exporter['enable'] = false
+ grafana['enable'] = false
+ letsencrypt['enable'] = false
+ ports:
+ - '8080:80'
+ - '2222:22'
diff --git a/tools/functional/fixtures/set_token.rb b/tools/functional/fixtures/set_token.rb
new file mode 100644
index 0000000..735dcd5
--- /dev/null
+++ b/tools/functional/fixtures/set_token.rb
@@ -0,0 +1,9 @@
+# https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#programmatically-creating-a-personal-access-token
+
+user = User.find_by_username('root')
+
+token = user.personal_access_tokens.create(scopes: [:api, :sudo], name: 'default');
+token.set_token('python-gitlab-token');
+token.save!
+
+puts token.token