mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 03:47:36 -02:30
Update base docs string
This commit is contained in:
committed by
Shane McDonald
parent
667121d325
commit
3c43ed6d2d
@@ -4,5 +4,5 @@ export default function getDocsBaseUrl(config) {
|
|||||||
if (licenseType && licenseType !== 'open') {
|
if (licenseType && licenseType !== 'open') {
|
||||||
version = config?.version ? config.version.split('-')[0] : 'latest';
|
version = config?.version ? config.version.split('-')[0] : 'latest';
|
||||||
}
|
}
|
||||||
return `https://docs.ansible.com/ansible-tower/${version}`;
|
return `https://docs.ansible.com/automation-controller/${version}`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ describe('getDocsBaseUrl', () => {
|
|||||||
version: '18.0.0',
|
version: '18.0.0',
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(result).toEqual('https://docs.ansible.com/ansible-tower/latest');
|
expect(result).toEqual(
|
||||||
|
'https://docs.ansible.com/automation-controller/latest'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return current version for enterprise license', () => {
|
it('should return current version for enterprise license', () => {
|
||||||
@@ -20,7 +22,9 @@ describe('getDocsBaseUrl', () => {
|
|||||||
version: '4.0.0',
|
version: '4.0.0',
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(result).toEqual('https://docs.ansible.com/ansible-tower/4.0.0');
|
expect(result).toEqual(
|
||||||
|
'https://docs.ansible.com/automation-controller/4.0.0'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should strip version info after hyphen', () => {
|
it('should strip version info after hyphen', () => {
|
||||||
@@ -31,7 +35,9 @@ describe('getDocsBaseUrl', () => {
|
|||||||
version: '4.0.0-beta',
|
version: '4.0.0-beta',
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(result).toEqual('https://docs.ansible.com/ansible-tower/4.0.0');
|
expect(result).toEqual(
|
||||||
|
'https://docs.ansible.com/automation-controller/4.0.0'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return latest version if license info missing', () => {
|
it('should return latest version if license info missing', () => {
|
||||||
@@ -39,6 +45,8 @@ describe('getDocsBaseUrl', () => {
|
|||||||
version: '18.0.0',
|
version: '18.0.0',
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(result).toEqual('https://docs.ansible.com/ansible-tower/latest');
|
expect(result).toEqual(
|
||||||
|
'https://docs.ansible.com/automation-controller/latest'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user