Skip to content

Commit

Permalink
[fleet] Use snapshot registry in dev mode (elastic#141797)
Browse files Browse the repository at this point in the history
* [fleet] Use snapshot registry in dev mode

* Update registry_url.ts

* Update registry_url.ts

* Fix jest test
  • Loading branch information
sorenlouv authored Sep 28, 2022
1 parent 5c2476a commit e8ebc23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jest.mock('../..', () => ({
getKibanaBranch: () => 'main',
getKibanaVersion: () => '99.0.0',
getConfig: () => ({}),
getIsProductionMode: () => false,
},
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const SNAPSHOT_REGISTRY_URL_CDN = 'https://epr-snapshot.elastic.co';

const getDefaultRegistryUrl = (): string => {
const branch = appContextService.getKibanaBranch();
if (branch === 'main') {
const isProduction = appContextService.getIsProductionMode();
if (!isProduction || branch === 'main') {
return SNAPSHOT_REGISTRY_URL_CDN;
} else if (appContextService.getKibanaVersion().includes('-SNAPSHOT')) {
return STAGING_REGISTRY_URL_CDN;
Expand Down

0 comments on commit e8ebc23

Please sign in to comment.