Skip to content

Commit 08f2e58

Browse files
author
Julien Pivotto
committed
Run ACC tests
Signed-off-by: Julien Pivotto <[email protected]>
1 parent 5df89ac commit 08f2e58

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ services:
55
language: go
66
go:
77
- "1.11.x"
8+
env:
9+
GITLAB_BASE_URL: http://127.0.0.1:8080/api/v4
10+
GITLAB_TOKEN: ACCTEST
811

912
install:
1013
# This script is used by the Travis build to install a cookie for
@@ -13,9 +16,11 @@ install:
1316
# See: https://github.com/golang/go/issues/12933
1417
- bash scripts/gogetcookie.sh
1518
- go get github.com/kardianos/govendor
19+
- bash scripts/start-gitlab.sh
1620

1721
script:
1822
- make test
23+
- make testacc
1924
- make vendor-status
2025
- make vet
2126
- make website-test

scripts/start-gitlab.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash -e
2+
echo "Starting gitlab container..."
3+
docker run -d -e GITLAB_ROOT_PASSWORD=adminadmin --rm -p 127.0.0.1:8080:80 --name gitlab gitlab/gitlab-ce
4+
echo -n "Waiting for gitlab to be ready "
5+
i=1
6+
until wget -t 1 127.0.0.1:8080 -O /dev/null -q
7+
do
8+
sleep 1
9+
echo -n .
10+
if [[ $((i%3)) == 0 ]]; then echo -n ' '; fi
11+
let i++
12+
done
13+
echo
14+
echo "Creating access token"
15+
echo 'PersonalAccessToken.create(user_id: 1, scopes: [:api, :read_user], name: :terraform, token: :ACCTEST).save!' | docker exec -i gitlab gitlab-rails console

0 commit comments

Comments
 (0)