Skip to content
Snippets Groups Projects
Select Git revision
  • 80e0ed61b3468066a7b68926b1a02ffdf25a567f
  • master default protected
  • v1.15.0
  • v1.14.0
  • v1.13.0
  • v1.12.0
  • v1.11.0
  • v1.10.0
  • v1.9.0
  • v1.8.0
  • v1.7.0
  • v1.6.0
  • v1.5.0
  • v1.4.1
  • v1.4.0
  • v1.3.1
  • v1.3.0
  • v1.2.1
  • v1.2.0
  • v1.1.0
  • v1.0.1
  • v1.0.0
22 results

commit_analyzer.go

Blame
  • gitlab-pipeline-status.tester.js 1.05 KiB
    'use strict'
    
    const Joi = require('joi')
    const { isBuildStatus } = require('../build-status')
    const t = (module.exports = require('../tester').createServiceTester())
    
    t.create('Pipeline status')
      .get('/gitlab-org/gitlab-ce.json')
      .expectJSONTypes(
        Joi.object().keys({
          name: 'build',
          value: isBuildStatus,
        })
      )
    
    t.create('Pipeline status (branch)')
      .get('/gitlab-org/gitlab-ce/v10.7.6.json')
      .expectJSONTypes(
        Joi.object().keys({
          name: 'build',
          value: isBuildStatus,
        })
      )
    
    t.create('Pipeline status (nonexistent branch)')
      .get('/gitlab-org/gitlab-ce/nope-not-a-branch.json')
      .expectJSON({
        name: 'build',
        value: 'branch not found',
      })
    
    t.create('Pipeline status (nonexistent repo)')
      .get('/this-repo/does-not-exist.json')
      .expectJSON({
        name: 'build',
        value: 'repo not found',
      })
    
    t.create('Pipeline status (custom gitlab URL)')
      .get('/GNOME/pango.json?gitlab_url=https://gitlab.gnome.org')
      .expectJSONTypes(
        Joi.object().keys({
          name: 'build',
          value: isBuildStatus,
        })
      )