Skip to content
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

test: [TERR-361] E2E tests for map edge coloration #44

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
697ee78
TERR-362
sanchezelton Apr 24, 2024
a7b73f3
TERR-362
sanchezelton Apr 26, 2024
6a843d1
TERR-362
sanchezelton May 9, 2024
6830d86
TERR-362
sanchezelton May 15, 2024
b8b3022
TERR-362
sanchezelton May 15, 2024
5a1dc4e
TERR-362
sanchezelton May 17, 2024
abf03d7
TERR-362
sanchezelton May 17, 2024
9ea183a
Merge branch 'end-to-end-tests' of github.com:esnet/grafana-esnet-net…
sanchezelton May 17, 2024
aa6aa17
- Fixes related to merge conflicts to resolve signature of getEditNet…
sanchezelton May 17, 2024
5154cfb
TERR-362
sanchezelton May 17, 2024
666c6cc
TERR-364
sanchezelton May 29, 2024
62231f5
TERR-364
sanchezelton May 29, 2024
e789ba3
TERR-364
sanchezelton May 29, 2024
db66cbb
TERR-364
sanchezelton May 30, 2024
814c44c
TERR-364
sanchezelton May 30, 2024
f39a14e
TERR-364
sanchezelton May 30, 2024
3843f82
TERR-364
sanchezelton May 30, 2024
75fce33
TERR-364
sanchezelton May 30, 2024
9aadb67
TERR-364
sanchezelton May 30, 2024
b1cc8f0
Merge branch 'feat/TERR-362-e2e-upon-empty-grafana-instance' of githu…
sanchezelton May 30, 2024
d1fb55d
TERR-364
sanchezelton May 30, 2024
b534446
TERR-364
sanchezelton May 30, 2024
3296bc8
TERR-364
sanchezelton May 30, 2024
f5c1072
TERR-364
sanchezelton May 30, 2024
faceb7a
TERR-364
sanchezelton May 31, 2024
a72afca
TERR-364
sanchezelton Jun 3, 2024
1f8d2ad
TERR-361
sanchezelton Jun 5, 2024
517d3c7
TERR-361
sanchezelton Jun 8, 2024
b787bdb
TERR-361
sanchezelton Jun 11, 2024
a3f49da
TERR-361
sanchezelton Jun 27, 2024
e6809c5
TERR-361
sanchezelton Aug 12, 2024
92072cd
TERR-361
sanchezelton Aug 16, 2024
d1c58df
TERR-361
sanchezelton Aug 16, 2024
787a484
TERR-361
sanchezelton Aug 16, 2024
6a29fd1
TERR-361
sanchezelton Aug 16, 2024
2ca0018
TERR-361
sanchezelton Aug 17, 2024
430feb2
TERR-361
sanchezelton Aug 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TERR-362
- removed unneeded console.log statements
  • Loading branch information
sanchezelton committed May 15, 2024
commit b8b302244b63ca643821a5109fbe5fa11941f380
3 changes: 1 addition & 2 deletions e2e/folderDashboardInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ export const getFolderDashboardTargets = async (params?: INetworkPanelParams): P
// invoke API update
try {
const updateResult = await updateDashboard(targetFolderUid, dashboardInfo);
console.log(`[${fnName}] Dashboard update result:\n`, JSON.stringify(updateResult, null, 2));
} catch (e) {
console.log(`[${fnName}] Dashboard update error:\n`, e.message);
console.error(`[${fnName}] Dashboard update error:\n`, e.message);
}

const targetsFixtureObj = {
Expand Down
6 changes: 0 additions & 6 deletions e2e/grafana-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export const createDatasource = async (fileId?: string, forceCreate = false): Pr
if (dataSrcCheckResponse.ok) {
// if exists, return info
resultDataSource = await dataSrcCheckResponse.json();
console.log(`[${fnName}] Fetched Existing Datasource:\n`, JSON.stringify(resultDataSource, null, 2));
} else if (!dataSrcCheckResponse.ok && dataSrcCheckResponse.status === 404) {
// if does not exist, create it
const inObj = {
Expand All @@ -72,7 +71,6 @@ export const createDatasource = async (fileId?: string, forceCreate = false): Pr
});
const jsonResponse = await dataSrcCreateResponse.json();
resultDataSource = jsonResponse.datasource;
console.log(`[${fnName}] Create New Datasource:\n`, JSON.stringify(resultDataSource, null, 2));
} else if (!dataSrcCheckResponse.ok) {
throw new Error(`HTTP Response ${dataSrcCheckResponse.status}: ${dataSrcCheckResponse.statusText}`);
}
Expand Down Expand Up @@ -140,7 +138,6 @@ export const createDashboard = async (folderUid: string, dbParams?: Partial<Dash
const { basicAuthHeader, protocolHostPort } = await getHostInfo(credentials);
const panels = [networkMapPanel];
if (dbParams && dbParams?.dataSource?.uid) {
console.log(`${fnName}: Overriding dataSource.uid with that generated from created dataSource ${dbParams.dataSource.uid}`)
panels[0].datasource.uid = dbParams.dataSource.uid;
}
const defaultDashboard = makeDashboard();
Expand All @@ -149,7 +146,6 @@ export const createDashboard = async (folderUid: string, dbParams?: Partial<Dash
folderUid,
};
const body = JSON.stringify(inObj, null, 2);
console.log(`[grafana-api.createDashboard]: Creating dashboard\n${body}`);
const dashboardCreateResponse: Response = await fetch(`${protocolHostPort}/api/dashboards/db`, {
method: "POST",
body,
Expand All @@ -159,7 +155,6 @@ export const createDashboard = async (folderUid: string, dbParams?: Partial<Dash
}
});
const dashboardCreateResponseJson = await dashboardCreateResponse.json();
console.log(`[Create Dashboard] Result:\n`, JSON.stringify(dashboardCreateResponseJson, null, 2));
return JSON.stringify(dashboardCreateResponseJson);
};

Expand Down Expand Up @@ -210,7 +205,6 @@ export const updateDashboard = async (folderUid: string, targetDashboard): Promi
});

const responseJson = await dbUpdateResponse.json();
console.log(`[Update Dashboard]:\n`, JSON.stringify(responseJson, null, 2));
return responseJson;
}

1 change: 0 additions & 1 deletion e2e/plugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ pluginTest.describe("plugin testing", () => {
const topology: ITopology = JSON.parse(topologyResponseText);

// setup dashboard, including topology data from datasource uid
console.log(`[pluginTest.use]: Binding dataSource.uid = ${dataSource.uid} with topology`);
const newFixtureObj = await getFolderDashboardTargets({
topology,
uid: dataSource.uid
Expand Down