mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
devenv: Add docker load test which authenticates with API key (#28905)
* Add loadtest which authenticates with API key - Edit load tests to assign the orgId in the default function, as the setup function is only called once for all VUs and therefore the change is not persisted to each VU. - Remove side effect from orgId setup function and explicitly set orgId in setup client * sort semicolons, whitespace
This commit is contained in:
@@ -12,15 +12,18 @@ const client = createClient(endpoint);
|
||||
export const setup = () => {
|
||||
const basicAuthClient = createBasicAuthClient(endpoint, 'admin', 'admin');
|
||||
const orgId = createTestOrgIfNotExists(basicAuthClient);
|
||||
basicAuthClient.withOrgId(orgId);
|
||||
const datasourceId = createTestdataDatasourceIfNotExists(basicAuthClient);
|
||||
client.withOrgId(orgId);
|
||||
|
||||
return {
|
||||
orgId: orgId,
|
||||
datasourceId: datasourceId,
|
||||
orgId,
|
||||
datasourceId,
|
||||
};
|
||||
};
|
||||
|
||||
export default data => {
|
||||
client.withOrgId(data.orgId);
|
||||
|
||||
group('user auth token test', () => {
|
||||
if (__ITER === 0) {
|
||||
group('user authenticates through ui with username and password', () => {
|
||||
|
||||
Reference in New Issue
Block a user