forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[7.x] Add functional test for Kibana embedded in iframe (elastic#68544)…
… (elastic#69487) * Add functional test for Kibana embedded in iframe (elastic#68544) * convert kbn test config into TS * add test for Kibana embedded in iframe * run embedded tests in functional suite * ignore tls errors in functional tests by default * switch test to https * remove env vars mutation * allow to pass ssl config to Kibana * pass ssl config to axios * adopt KbnClient interfaces * adopt KibanaServer * use KbnRequester in security service * set sameSiteCookies:None in test * acceptInsecureCerts in chrome * remove leftovers * fix type error * remove unnecessary field * address comments * refactor plugin * refactor test * make acceptInsecureCerts configurable * run firefox tests on ci * up TS version * fix firefox.sh script * fix path Co-authored-by: Elastic Machine <[email protected]> # Conflicts: # test/functional/services/remote/remote.ts # test/functional/services/remote/webdriver.ts # x-pack/scripts/functional_tests.js * create browser config. lost during conflict resolution
- Loading branch information
Showing
30 changed files
with
394 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,26 +16,34 @@ | |
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { kibanaTestUser } from './users'; | ||
import url from 'url'; | ||
import { kibanaTestUser } from './users'; | ||
|
||
interface UrlParts { | ||
protocol?: string; | ||
hostname?: string; | ||
port?: number; | ||
auth?: string; | ||
username?: string; | ||
password?: string; | ||
} | ||
|
||
export const kbnTestConfig = new (class KbnTestConfig { | ||
getPort() { | ||
return this.getUrlParts().port; | ||
} | ||
|
||
getUrlParts() { | ||
getUrlParts(): UrlParts { | ||
// allow setting one complete TEST_KIBANA_URL for ES like https://elastic:[email protected]:9200 | ||
if (process.env.TEST_KIBANA_URL) { | ||
const testKibanaUrl = url.parse(process.env.TEST_KIBANA_URL); | ||
return { | ||
protocol: testKibanaUrl.protocol.slice(0, -1), | ||
protocol: testKibanaUrl.protocol?.slice(0, -1), | ||
hostname: testKibanaUrl.hostname, | ||
port: parseInt(testKibanaUrl.port, 10), | ||
port: testKibanaUrl.port ? parseInt(testKibanaUrl.port, 10) : undefined, | ||
auth: testKibanaUrl.auth, | ||
username: testKibanaUrl.auth.split(':')[0], | ||
password: testKibanaUrl.auth.split(':')[1], | ||
username: testKibanaUrl.auth?.split(':')[0], | ||
password: testKibanaUrl.auth?.split(':')[1], | ||
}; | ||
} | ||
|
||
|
@@ -44,7 +52,7 @@ export const kbnTestConfig = new (class KbnTestConfig { | |
return { | ||
protocol: process.env.TEST_KIBANA_PROTOCOL || 'http', | ||
hostname: process.env.TEST_KIBANA_HOSTNAME || 'localhost', | ||
port: parseInt(process.env.TEST_KIBANA_PORT, 10) || 5620, | ||
port: process.env.TEST_KIBANA_PORT ? parseInt(process.env.TEST_KIBANA_PORT, 10) : 5620, | ||
auth: `${username}:${password}`, | ||
username, | ||
password, | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.