-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Monitoring] Ensure cloud cannot see setup mode #49223
[Monitoring] Ensure cloud cannot see setup mode #49223
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Great job!
Pinging @elastic/stack-monitoring (Team:Monitoring) |
@igoristic Would love any feedback on how to make 72b8a67 better :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this per the instructions and works as promised!
💔 Build Failed |
@chrisronline function setModules(isOnCloud = false) {
jest.clearAllMocks().resetModules();
injectorModulesMock.globalState.inSetupMode = false;
jest.doMock('ui/chrome', () => ({
getInjected: (key) => {
if (key === 'isOnCloud') {
return isOnCloud;
}
}
}));
const setupMode = require('./setup_mode');
toggleSetupMode = setupMode.toggleSetupMode;
initSetupModeState = setupMode.initSetupModeState;
getSetupModeState = setupMode.getSetupModeState;
updateSetupModeData = setupMode.updateSetupModeData;
setSetupModeMenuItem = setupMode.setSetupModeMenuItem;
} So, now instead of this: https://github.com/elastic/kibana/pull/49223/files#diff-16124668cbf2ae94c6eafa83ae18894fL112-R133 I would just call |
@elasticmachine merge upstream |
💚 Build Succeeded |
@elasticmachine merge upstream |
💚 Build Succeeded |
* Ensure cloud cannot see setup mode * Remove cloud check from collection status, as it's an injected var now * Man these tests suck
Resolves #49225
To test, pull down this PR and manually ensure
isOnCloud
istrue
here