Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix [JiraSprint] tests #10746

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions services/jira/jira-issue.tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ t.create('known issue')
.expectBadge({ label: 'kafka-2896', message: 'Resolved' })

t.create('no status color')
.get('/foo-123.json?baseUrl=http://issues.apache.org/jira')
.get('/foo-123.json?baseUrl=https://issues.apache.org/jira')
.intercept(nock =>
nock('http://issues.apache.org/jira/rest/api/2/issue')
nock('https://issues.apache.org/jira/rest/api/2/issue')
.get(`/${encodeURIComponent('foo-123')}`)
.reply(200, {
fields: {
Expand Down
16 changes: 8 additions & 8 deletions services/jira/jira-sprint.tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ import { sprintId, sprintQueryString } from './jira-test-helpers.js'
export const t = await createServiceTester()

t.create('unknown sprint')
.get('/abc.json?baseUrl=https://jira.spring.io')
.get('/abc.json?baseUrl=https://issues.apache.org/jira')
.expectBadge({ label: 'jira', message: 'sprint not found' })

t.create('known sprint')
.get('/94.json?baseUrl=https://jira.spring.io')
.get('/3.json?baseUrl=https://issues.apache.org/jira')
.expectBadge({
label: 'completion',
message: isIntegerPercentage,
})

t.create('100% completion')
.get(`/${sprintId}.json?baseUrl=http://issues.apache.org/jira`)
.get(`/${sprintId}.json?baseUrl=https://issues.apache.org/jira`)
.intercept(nock =>
nock('http://issues.apache.org/jira/rest/api/2')
nock('https://issues.apache.org/jira/rest/api/2')
.get('/search')
.query(sprintQueryString)
.reply(200, {
Expand Down Expand Up @@ -47,9 +47,9 @@ t.create('100% completion')
})

t.create('0% completion')
.get(`/${sprintId}.json?baseUrl=http://issues.apache.org/jira`)
.get(`/${sprintId}.json?baseUrl=https://issues.apache.org/jira`)
.intercept(nock =>
nock('http://issues.apache.org/jira/rest/api/2')
nock('https://issues.apache.org/jira/rest/api/2')
.get('/search')
.query(sprintQueryString)
.reply(200, {
Expand All @@ -72,9 +72,9 @@ t.create('0% completion')
})

t.create('no issues in sprint')
.get(`/${sprintId}.json?baseUrl=http://issues.apache.org/jira`)
.get(`/${sprintId}.json?baseUrl=https://issues.apache.org/jira`)
.intercept(nock =>
nock('http://issues.apache.org/jira/rest/api/2')
nock('https://issues.apache.org/jira/rest/api/2')
.get('/search')
.query(sprintQueryString)
.reply(200, {
Expand Down
Loading