From 9daa3df04db552b0cf52538f2f3931930b8858b7 Mon Sep 17 00:00:00 2001 From: zhilan Date: Mon, 20 Nov 2023 10:29:23 +0800 Subject: [PATCH 1/2] Add vmcore wb test vmcore_list,vmcore_config,vmcore_match --- .../cypress/e2e/vmcore/vmcore_config.cy.js | 24 +++++++++++++++++++ .../cypress/e2e/vmcore/vmcore_list.cy.js | 14 +++++++++++ .../cypress/e2e/vmcore/vmcore_match.cy.js | 17 +++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 sysom_web/cypress/e2e/vmcore/vmcore_config.cy.js create mode 100644 sysom_web/cypress/e2e/vmcore/vmcore_list.cy.js create mode 100644 sysom_web/cypress/e2e/vmcore/vmcore_match.cy.js diff --git a/sysom_web/cypress/e2e/vmcore/vmcore_config.cy.js b/sysom_web/cypress/e2e/vmcore/vmcore_config.cy.js new file mode 100644 index 00000000..306789fa --- /dev/null +++ b/sysom_web/cypress/e2e/vmcore/vmcore_config.cy.js @@ -0,0 +1,24 @@ +/// + +describe("vmcore list page", () => { + it("show vmcore list", () => { + cy.intercept("POST","/api/v1/vmcore/vmcore_config_test").as("vmcoreTest") + cy.login() + cy.visit("/vmcore/config") + /* ==== Generated with Cypress Studio ==== */ + cy.get('#name').clear(); + cy.get('#name').type("testconfig"); + cy.get('#server_host').clear(); + cy.get('#server_host').type("127.0.0.1"); + cy.get('#mount_point').clear(); + cy.get('#mount_point').type("/tmp/vmcore-nfs"); + cy.get('#days').clear(); + /* ==== Generated with Cypress Studio ==== */ + cy.get('.ml20___wnEIC').click(); + cy.get(':nth-child(1) > .ant-descriptions-item > .ant-descriptions-item-container > .ant-descriptions-item-content').should('have.text',"testconfig"); + cy.get(':nth-child(2) > .ant-descriptions-item > .ant-descriptions-item-container > .ant-descriptions-item-content').should('have.text',"127.0.0.1"); + cy.get(':nth-child(3) > .ant-descriptions-item > .ant-descriptions-item-container > .ant-descriptions-item-content').should('have.text',"/tmp/vmcore-nfs"); + //cy.get('.configleft17___1xVO3').click(); + /* ==== End Cypress Studio ==== */ + }) +}) diff --git a/sysom_web/cypress/e2e/vmcore/vmcore_list.cy.js b/sysom_web/cypress/e2e/vmcore/vmcore_list.cy.js new file mode 100644 index 00000000..93269ba3 --- /dev/null +++ b/sysom_web/cypress/e2e/vmcore/vmcore_list.cy.js @@ -0,0 +1,14 @@ +/// + +describe("vmcore list page", () => { + it("show vmcore list", () => { + cy.login() + cy.visit("/vmcore/list") + /* ==== Generated with Cypress Studio ==== */ + cy.get(':nth-child(1) > .ant-pro-card > .ant-pro-card-body > .ant-statistic > .ant-statistic-content > .ant-statistic-content-value > .ant-statistic-content-value-int').invoke('text').should('match',/^\d+/); + cy.get(':nth-child(3) > .ant-pro-card > .ant-pro-card-body > .ant-statistic > .ant-statistic-content > .ant-statistic-content-value > .ant-statistic-content-value-int').invoke('text').should('match',/^\d+/); + cy.get(':nth-child(5) > .ant-pro-card > .ant-pro-card-body > .ant-statistic > .ant-statistic-content > .ant-statistic-content-value ').invoke('text').should('match',/^\d+\.\d+$/); + cy.get(':nth-child(7) > .ant-pro-card > .ant-pro-card-body > .ant-statistic > .ant-statistic-content > .ant-statistic-content-value ').invoke('text').should('match',/^\d+\.\d+$/); + /* ==== End Cypress Studio ==== */ + }) +}) diff --git a/sysom_web/cypress/e2e/vmcore/vmcore_match.cy.js b/sysom_web/cypress/e2e/vmcore/vmcore_match.cy.js new file mode 100644 index 00000000..f7c1825a --- /dev/null +++ b/sysom_web/cypress/e2e/vmcore/vmcore_match.cy.js @@ -0,0 +1,17 @@ +/// + +describe("vmcore list page", () => { + it("show vmcore list", () => { + cy.login() + cy.visit("/vmcore/match") + /* ==== Generated with Cypress Studio ==== */ + cy.get('#similar_dmesg').clear(); + //let inputText = " [6231329.685410] Kernel panic - not syncing: sysrq triggered crash \n[6231329.685933] CPU: 3 PID: 514785 Comm: bash Kdump: loaded Tainted: G W E 5.10.134-14.an8.x86_64 #1 \n[6231329.686813] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 449e491 04/01/2014 \n[6231329.687515] Call Trace: \n[6231329.687759] dump_stack+0x57/0x6e\n [6231329.688070] panic+0x10d/0x2e9 \n[6231329.688392] sysrq_handle_crash+0x16/0x20\n [6231329.688759] __handle_sysrq.cold.18+0x7a/0xe8\n [6231329.689159] write_sysrq_trigger+0x2b/0x40 \n [6231329.689548] proc_reg_write+0x3b/0x80 \n[6231329.689887] vfs_write+0xb5/0x260 \n[6231329.690203] ksys_write+0x49/0xc0 \n[6231329.690523] do_syscall_64+0x33/0x40 \n[6231329.690853] entry_SYSCALL_64_after_hwframe+0x61/0xc6 \n[6231329.691325] RIP: 0033:0x7f4d40d205a8 "; + //cy.get("#similar_dmesg").invoke('val', inputText) + //cy.get('#similar_dmesg').type( " [6231329.685410] Kernel panic - not syncing: sysrq triggered crash \n[6231329.685933] CPU: 3 PID: 514785 Comm: bash Kdump: loaded Tainted: G W E 5.10.134-14.an8.x86_64 #1 \n[6231329.686813] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 449e491 04/01/2014 \n[6231329.687515] Call Trace: \n[6231329.687759] dump_stack+0x57/0x6e\n [6231329.688070] panic+0x10d/0x2e9 \n[6231329.688392] sysrq_handle_crash+0x16/0x20\n [6231329.688759] __handle_sysrq.cold.18+0x7a/0xe8\n [6231329.689159] write_sysrq_trigger+0x2b/0x40 \n [6231329.689548] proc_reg_write+0x3b/0x80 \n[6231329.689887] vfs_write+0xb5/0x260 \n[6231329.690203] ksys_write+0x49/0xc0 \n[6231329.690523] do_syscall_64+0x33/0x40 \n[6231329.690853] entry_SYSCALL_64_after_hwframe+0x61/0xc6 \n[6231329.691325] RIP: 0033:0x7f4d40d205a8 "); + cy.get('#similar_dmesg').type("123") + cy.get(':nth-child(2) > .ant-btn').click(); + cy.get('table > tbody').eq(0).children().should('have.length.of.at.least',1) + /* ==== End Cypress Studio ==== */ + }) +}) -- Gitee From 06a3689897bb67251e314cc552ac4c78bfc1b962 Mon Sep 17 00:00:00 2001 From: ydjohn Date: Fri, 19 Jan 2024 03:48:46 +0000 Subject: [PATCH 2/2] update docs/develop_guide.md. Signed-off-by: ydjohn --- docs/develop_guide.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/develop_guide.md b/docs/develop_guide.md index b40b6fe9..8f9ee54e 100644 --- a/docs/develop_guide.md +++ b/docs/develop_guide.md @@ -302,4 +302,27 @@ for msg in consumer: # 使用示例 => 下列命令会一键创建一个名为 sysom_demo 的微服务,并监听在 7010 端口 ./sysom.sh create server demo 7010 -``` \ No newline at end of file +``` + +### 3.1 已有微服务以及端口占用情况 +| **微服务名** | **占用端口** | +| -------------- | ----------------- | +| sysom_api | 7001 | +| sysom_diagnosis | 7002 | +| sysom_channel | 7003 | +| sysom_vmcore | 7004 | +| sysom_vul | 7005 | +| sysom_migration | 7006 | +| sysom_hotfix | 7007 | +| sysom_monitor_server | 7009 | +| sysom_log | 7010 | +| sysom_cec_proxy | 7011 | +| sysom_alarm | 7012 | +| sysom_rca | 7013 | +| sysom_ad_proxy | 7014 | +| sysom_knowledge | 7015 | +| sysom_hotfix_builder | 7016 | +| sysom_metric_anomaly_detection | 7017 | +| sysom_alert_pusher | 7018 | +| sysom_dingtalk | 7019 | +| sysom_cluster_health | 7020 | \ No newline at end of file -- Gitee