summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorSanad Liaquat <sliaquat@gitlab.com>2019-03-26 16:39:52 +0500
committerSanad Liaquat <sliaquat@gitlab.com>2019-03-26 16:39:52 +0500
commit4d84d1a850bc002e5d1269c360a5155bcc8fa243 (patch)
treef626f1301a0bf016dab9bde7398170fea2f088f8 /db
parentb4de23a687d16c96f1adaa456e4aeaac64d9cb23 (diff)
downloadgitlab-ce-4d84d1a850bc002e5d1269c360a5155bcc8fa243.tar.gz
Add seed for personal access token
Diffstat (limited to 'db')
-rw-r--r--db/fixtures/development/25_api_personal_access_token.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/fixtures/development/25_api_personal_access_token.rb b/db/fixtures/development/25_api_personal_access_token.rb
new file mode 100644
index 00000000000..a2e6c674c1f
--- /dev/null
+++ b/db/fixtures/development/25_api_personal_access_token.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+require './spec/support/sidekiq'
+
+# Create an api access token for root user with the value: ypCa3Dzb23o5nvsixwPA
+Gitlab::Seeder.quiet do
+ PersonalAccessToken.create!(
+ user_id: User.find_by(username: 'root').id,
+ name: "seeded-api-token",
+ scopes: ["api"],
+ token_digest: "/O0jfLERYT/L5gG8nfByQxqTj43TeLlRzOtJGTzRsbQ="
+ )
+
+ print '.'
+end