Skip to content

Commit

Permalink
Fixes "servers.elasticsearch.auth" must be a string error (elastic#10…
Browse files Browse the repository at this point in the history
…5095)

* fixes integration with stack testing upgrade framework

* fixes the provider name flexibility

* fixes type check error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
MadameSheema and kibanamachine authored Jul 16, 2021
1 parent 2dd3693 commit 9f2d9d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 6 additions & 1 deletion x-pack/plugins/security_solution/cypress/tasks/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ const credentialsProvidedByEnvironment = (): boolean =>
* Kibana's `/internal/security/login` endpoint, bypassing the login page (for speed).
*/
const loginViaEnvironmentCredentials = () => {
const providerName =
Cypress.env('protocol') === 'http' || Cypress.config().baseUrl!.includes('staging')
? 'basic'
: 'cloud-basic';

cy.log(
`Authenticating via environment credentials from the \`CYPRESS_${ELASTICSEARCH_USERNAME}\` and \`CYPRESS_${ELASTICSEARCH_PASSWORD}\` environment variables`
);
Expand All @@ -213,7 +218,7 @@ const loginViaEnvironmentCredentials = () => {
cy.request({
body: {
providerType: 'basic',
providerName: 'basic',
providerName,
currentURL: '/',
params: {
username: Cypress.env(ELASTICSEARCH_USERNAME),
Expand Down
7 changes: 1 addition & 6 deletions x-pack/test/security_solution_cypress/upgrade_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
* 2.0.
*/

import { FtrConfigProviderContext } from '@kbn/test';

import { SecuritySolutionCypressUpgradeCliTestRunner } from './runner';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const securitySolutionCypressConfig = await readConfigFile(require.resolve('./config.ts'));
export default async function () {
return {
...securitySolutionCypressConfig.getAll(),

testRunner: SecuritySolutionCypressUpgradeCliTestRunner,
};
}

0 comments on commit 9f2d9d4

Please sign in to comment.