mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-18 15:55:30 +00:00
Updating travis
This commit is contained in:
parent
8f18780c86
commit
95b8081d0c
@ -11,19 +11,22 @@ cache:
|
||||
## Spin up glitlab instance and sleep for 60 seconds
|
||||
before_script:
|
||||
## Spin up container
|
||||
- cd test/docker/
|
||||
- docker-compose -f docker-compose.test.yml up
|
||||
- cd .
|
||||
|
||||
## Get the docker env variables
|
||||
- export PERSONAL_ACCESS_TOKEN=$(docker exec -i gitlab echo PERSONAL_ACCESS_TOKEN)
|
||||
- export GITLAB_URL=$(docker exec -i gitlab echo PERSONAL_ACCESS_TOKEN)
|
||||
- export GITLAB_URL=$(docker exec -i gitlab echo GITLAB_URL)
|
||||
|
||||
## Sleep before performing commands on container
|
||||
- sleep 10000
|
||||
- sleep 30
|
||||
|
||||
## run tests
|
||||
script:
|
||||
- npm run test:infrastructure
|
||||
- npm run test:bundles
|
||||
- npm run test:services
|
||||
|
||||
after_script:
|
||||
- docker-compose -f docker-compose.test.yml down
|
||||
@ -34,4 +37,3 @@ jobs:
|
||||
script: npm run lint
|
||||
- stage: build
|
||||
script: npm run build
|
||||
# script: npm run test:services
|
||||
@ -1,8 +1,13 @@
|
||||
import { Projects } from '../../src';
|
||||
|
||||
const credentials = {
|
||||
url: process.env.GITLAB_URL,
|
||||
token: process.env.PERSONAL_ACCESS_TOKEN
|
||||
}
|
||||
|
||||
describe('Projects.all', () => {
|
||||
it('should return empty array', async () => {
|
||||
const service = new Projects({ url: process.env.GITLAB_URL, token: process.env.API_TOKEN });
|
||||
const service = new Projects(credentials);
|
||||
const projects = await service.all();
|
||||
|
||||
expect(projects).toEqual([]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user