diff --git a/services/codeclimate/codeclimate-analysis.service.js b/services/codeclimate/codeclimate-analysis.service.js index e76351b6fd2e77c01b5d2d7bfa3dc11671ab92a8..f6e59055667b3bc0794ebe81fdeba58610684b48 100644 --- a/services/codeclimate/codeclimate-analysis.service.js +++ b/services/codeclimate/codeclimate-analysis.service.js @@ -100,8 +100,8 @@ export default class CodeclimateAnalysis extends BaseJsonService { ':format(maintainability|maintainability-percentage)/:user/:repo', namedParams: { format: 'maintainability', - user: 'angular', - repo: 'angular', + user: 'tensorflow', + repo: 'models', }, staticPreview: this.render({ variant: 'maintainability', @@ -122,7 +122,7 @@ export default class CodeclimateAnalysis extends BaseJsonService { { title: 'Code Climate technical debt', pattern: 'tech-debt/:user/:repo', - namedParams: { user: 'angular', repo: 'angular' }, + namedParams: { user: 'tensorflow', repo: 'models' }, staticPreview: this.render({ variant: 'tech-debt', techDebtPercentage: 3.0, diff --git a/services/codeclimate/codeclimate-analysis.tester.js b/services/codeclimate/codeclimate-analysis.tester.js index ea58bc765a83559bb29e03e57d54ef1136db7422..b52283f80c19fe1b542f5f2e6093e0da84bbeb6f 100644 --- a/services/codeclimate/codeclimate-analysis.tester.js +++ b/services/codeclimate/codeclimate-analysis.tester.js @@ -6,41 +6,41 @@ export const t = await createServiceTester() // Examples for this service can be found through the explore page: // https://codeclimate.com/explore -t.create('issues count').get('/issues/angular/angular.json').expectBadge({ +t.create('issues count').get('/issues/tensorflow/models.json').expectBadge({ label: 'issues', message: Joi.number().integer().positive(), }) t.create('technical debt percentage') - .get('/tech-debt/angular/angular.json') + .get('/tech-debt/tensorflow/models.json') .expectBadge({ label: 'technical debt', message: isIntegerPercentage, }) t.create('maintainability percentage') - .get('/maintainability-percentage/angular/angular.json') + .get('/maintainability-percentage/tensorflow/models.json') .expectBadge({ label: 'maintainability', message: isIntegerPercentage, }) t.create('maintainability letter') - .get('/maintainability/angular/angular.json') + .get('/maintainability/tensorflow/models.json') .expectBadge({ label: 'maintainability', message: Joi.equal('A', 'B', 'C', 'D', 'E', 'F'), }) t.create('issues when outer user repos query returns multiple items') - .get('/issues/angular/angular.json') + .get('/issues/tensorflow/models.json') .intercept(nock => nock('https://api.codeclimate.com', { allowUnmocked: true }) - .get('/v1/repos?github_slug=angular%2Fangular') + .get('/v1/repos?github_slug=tensorflow%2Fmodels') .reply(200, { data: [ { - id: '54fd4e6b6956804a10003df4', + id: 'xxxxxxxxxxxx', // Fake repo id, which is expected to be ignored in favour of the one that does contain snapshot data. relationships: { latest_default_branch_snapshot: { data: null, @@ -51,11 +51,11 @@ t.create('issues when outer user repos query returns multiple items') }, }, { - id: '54fd4e6b6956804a10003df3', + id: '57e2efacc718d40058000c9b', // Real repo id for tensorflow/models. The test retrieves live data using the real snapshot id below. relationships: { latest_default_branch_snapshot: { data: { - id: '620e2b491b6a72000100ca1d', + id: '64786eee4fedea000101580d', type: 'snapshots', }, }, @@ -88,10 +88,10 @@ t.create('maintainability letter for repo without snapshots') }) t.create('malformed response for outer user repos query') - .get('/maintainability/angular/angular.json') + .get('/maintainability/tensorflow/models.json') .intercept(nock => nock('https://api.codeclimate.com') - .get('/v1/repos?github_slug=angular%2Fangular') + .get('/v1/repos?github_slug=tensorflow%2Fmodels') .reply(200, { data: [{}], // No relationships in the list of data elements. }) @@ -102,7 +102,7 @@ t.create('malformed response for outer user repos query') }) t.create('malformed response for inner specific repo query') - .get('/maintainability/angular/angular.json') + .get('/maintainability/tensorflow/models.json') .intercept(nock => nock('https://api.codeclimate.com', { allowUnmocked: true }) .get(/\/v1\/repos\/[a-z0-9]+\/snapshots\/[a-z0-9]+/) diff --git a/services/codeclimate/codeclimate-coverage.tester.js b/services/codeclimate/codeclimate-coverage.tester.js index 4f5796613b0513d460ae2e797b8480eac386edcf..94e20d1176167ca6e5e08718c23b514bb889365f 100644 --- a/services/codeclimate/codeclimate-coverage.tester.js +++ b/services/codeclimate/codeclimate-coverage.tester.js @@ -28,7 +28,7 @@ t.create('test coverage when outer user repos query returns multiple items') .reply(200, { data: [ { - id: '558479d6e30ba034120008a8', + id: 'xxxxxxxxxxxx', // Fake repo id, which is expected to be ignored in favour of the one that does contain snapshot data. relationships: { latest_default_branch_snapshot: { data: null, @@ -39,14 +39,14 @@ t.create('test coverage when outer user repos query returns multiple items') }, }, { - id: '558479d6e30ba034120008a9', + id: '558479d6e30ba034120008a9', // Real repo id for codeclimate/codeclimate. The test retrieves live data using the real test report id below. relationships: { latest_default_branch_snapshot: { data: null, }, latest_default_branch_test_report: { data: { - id: '62110434a7160b00010b4b59', + id: '6463c8a3e3bc340001004bce', type: 'test_reports', }, },