From f9bfc2db158e7834830ceab8c13e475c3d49fcac Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Mon, 17 Feb 2025 22:35:14 +0100 Subject: [PATCH 01/14] feat: mindmap-terminal integration test, first implementation --- Makefile | 2 +- tests/e2e/cloud-init.yaml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d917e51d..cf878d0b 100644 --- a/Makefile +++ b/Makefile @@ -260,7 +260,7 @@ mindwm_test: python3 -m venv .venv && \ source .venv/bin/activate && \ pip3 install -r ./requirements.txt && \ - pytest -s -x -m mindwm_test --no-header --junit-xml=$(ARTIFACT_DIR)/report.xml --disable-warnings -vv --gherkin-terminal-reporter --kube-config=$${HOME}/.kube/config --alluredir=$(ARTIFACT_DIR)/allure-results . | tee $(ARTIFACT_DIR)/report.md + pytest -s -x -m mindwm_lifecycle,mindmap_terminal --no-header --junit-xml=$(ARTIFACT_DIR)/report.xml --disable-warnings -vv --gherkin-terminal-reporter --kube-config=$${HOME}/.kube/config --alluredir=$(ARTIFACT_DIR)/allure-results . | tee $(ARTIFACT_DIR)/report.md exit_code=$${PIPESTATUS[0]} echo $${exit_code} > $(ARTIFACT_DIR)/exit_code xmlstarlet sel -t -m "//testcase[failure]" -v "concat(@classname,' ', @name)" -n $(ARTIFACT_DIR)/report.xml | tee $(ARTIFACT_DIR)/failed_test_title diff --git a/tests/e2e/cloud-init.yaml b/tests/e2e/cloud-init.yaml index d47c5f18..c5776e13 100644 --- a/tests/e2e/cloud-init.yaml +++ b/tests/e2e/cloud-init.yaml @@ -13,6 +13,13 @@ packages: - tmux - ripgrep - xmlstarlet + # for mindmap-terminal tests + - wmctrl + - xdotool + - fvwm3 + - xvfb + - wget + - openjdk-17-jdk groups: - ci - docker @@ -44,3 +51,4 @@ runcmd: - sysctl -w fs.inotify.max_queued_events=2099999999 - curl -Lo /usr/bin/kubectl https://dl.k8s.io/release/v1.32.0/bin/linux/amd64/kubectl - chmod +x /usr/bin/kubectl + - update-java-alternatives --set java-1.17.0-openjdk-amd64 From f407a329007c8c2b3664f764f0a65c0dce9ddf9e Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Mon, 17 Feb 2025 22:36:43 +0100 Subject: [PATCH 02/14] feat: add bdd test for mindmap-terminal --- .../6_0_0_mindmap_terminal_freeplane.feature | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature diff --git a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature new file mode 100644 index 00000000..f09f9957 --- /dev/null +++ b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature @@ -0,0 +1,107 @@ +@mindmap_terminal +@mindwm_test + +Feature: Mindmap terminal integration test + Background: + Given A MindWM environment + Then all nodes in Kubernetes are ready + + Scenario: Install freeplane + When God runs the command 'wget -c -O /tmp/freeplane.deb https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_1.12.9~upstream-1_all.deb/download' inside the '' directory + When God runs the command 'sudo dpkg -i /freeplane.deb' inside the '' directory + Examples: + | work_dir | display | + | /tmp/ | 42 | + + + Scenario: Prepare environment, context: , username: , host: + When God creates a MindWM context with the name "" + Then the context should be ready and operable + + And the following deployments are in a ready state in the "context-" namespace + | Deployment name | + | iocontext-00001-deployment | + + And the following resources of type "services.serving.knative.dev/v1" has a status "Ready" equal "True" in "context-" namespace + | Knative service name | + | iocontext | + + And statefulset "-neo4j" in namespace "context-" is in ready state + + When God creates a MindWM user resource with the name "" and connects it to the context "" + Then the user resource should be ready and operable + + When God creates a MindWM host resource with the name "" and connects it to the user "" + Then the host resource should be ready and operable + + Examples: + | context | username | host | + | headwind | bebebeka | ubuntu-dev | + + Scenario: Clone @ to + When God clones the repository '' with branch '' and commit '' to '' + Then the directory '' should exist + + Examples: + | repo | branch | commit | clone_dir | + | https://github.com/mindwm/mindmap-terminal | master | HEAD | /tmp/mindmap-terminal | + | https://github.com/mindwm/mindwm-manager | master | HEAD | /tmp/mindwm-manager | + + Scenario: Install, configure and run mindwm-manager + Then the directory '' should exist + When God runs the command 'python3.11 -m venv .venv' inside the '' directory + When God runs the command '.venv/bin/pip install -r requirements.txt' inside the '' directory + When God runs the command 'set -a && . /.env.sample && //.venv/bin/python3.11 src/manager.py > /log 2>&1 &' inside the '' directory + Then God waits for '5' seconds + When God runs the command 'pgrep -fx "^//tmp/mindwm-manager/.venv/bin/python3.11 src/manager.py$"' inside the '' directory + Then file "/log" should not contain "Traceback \(most recent call last\):" regex + Then file "/log" contain "INFO:mindwm.events:Subscribed to NATS subject:.*" regex + + Examples: + | work_dir | + | /tmp/mindwm-manager | + # + Scenario: Run xvfb server at : port + When God runs the command 'nohup Xvfb : -screen 0 1024x768x16 > /tmp/x 2>&1 &' inside the '' directory + When God runs the command 'nohup fvwm3 -d : >/tmp/y 2>&1 &' inside the '' directory + When God runs the command 'pgrep -f ^Xvfb' inside the '' directory + When God runs the command 'pgrep -f ^fvwm3' inside the '' directory + + Examples: + | display | work_dir | + | 42 | /tmp | + # + Scenario: Run freeplane + When God runs the command 'export DISPLAY=:; make freeplane_start > /log 2>&1 &' inside the '' directory + Then God waits for '10' seconds + When God runs the command 'DISPLAY=: wmctrl -l | grep Freeplane' inside the '' directory + When God runs the command 'DISPLAY=: wmctrl -l | grep -E "mindmap-terminal-[0-9]+-Map[0-9]+?-ID_[0-9]+"' inside the '' directory + + Examples: + | work_dir | display | + | /tmp/mindmap-terminal | 42 | + + Scenario: Run test + When God runs the command 'export DISPLAY=:; xdotool search --name "freeplane" windowactivate' inside the '' directory + Then God waits for '3' seconds + When God runs the command 'export DISPLAY=:; xdotool key Escape' inside the '' directory + Then God waits for '3' seconds + When God runs the command 'export DISPLAY=:; xdotool type "uptime"' inside the '' directory + Then God waits for '3' seconds + When God runs the command 'export DISPLAY=:; xdotool key Return' inside the '' directory + Examples: + | work_dir | display | + | /tmp/mindmap-terminal | 42 | + # + # + Scenario: Verification that the io-document has been delivered and processed + Then the following deployments are in a ready state in the "context-" namespace + | Deployment name | + | iocontext-00001-deployment | + And container "user-container" in pod "iocontext-00001-deployment.*" in namespace "context-" should contain "uptime" regex + And container "user-container" in pod "^.*-00001-deployment-.*" in namespace "context-" should not contain "Traceback \(most recent call last\):" regex + And container "user-container" in pod "^dead-letter-.*" in namespace "context-" should not contain "cloudevents.Event\n" regex + + Examples: + | context | username | host | + | headwind | ci | localhost | From b71ac3ced7b2bbbee6b081df4aef281c3afd8498 Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Mon, 17 Feb 2025 22:44:40 +0100 Subject: [PATCH 03/14] fix(e2e): increase timeout to 270 seconds for cloud-init --- tests/e2e/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/main.tf b/tests/e2e/main.tf index f5a80394..65e6a531 100644 --- a/tests/e2e/main.tf +++ b/tests/e2e/main.tf @@ -87,7 +87,7 @@ resource "linode_instance" "ci" { inline = [ "mkdir -p ${var.artifact_dir}", "echo 0 > ${var.artifact_dir}/exit_code", - "timeout 90 bash -c 'while :; do docker info && break; sleep 1; echo -n .; done'", + "timeout 270 bash -c 'while :; do docker info && break; sleep 1; echo -n .; done'", # "echo dir: `basename ${var.git_repository}` checkout ${var.git_commit_sha} TARGET_REVISION=${var.git_ref_name}", #"cd `basename ${var.git_repository}` && make mindwm_lifecycle sleep-300 mindwm_test ARTIFACT_DIR=${var.artifact_dir} TARGET_REVISION=${var.git_ref_name} || echo $? > ${var.artifact_dir}/exit_code", #"cd ${var.artifact_dir} && tar cvf /tmp/artifacts.tar *" From 440e12d785f741392e013e867418d06a53d86091 Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Mon, 17 Feb 2025 22:50:21 +0100 Subject: [PATCH 04/14] fix(pytest): run tests only with mindwm_lifecyce and mindmap-terminal markers --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cf878d0b..93b0d2d2 100644 --- a/Makefile +++ b/Makefile @@ -260,7 +260,7 @@ mindwm_test: python3 -m venv .venv && \ source .venv/bin/activate && \ pip3 install -r ./requirements.txt && \ - pytest -s -x -m mindwm_lifecycle,mindmap_terminal --no-header --junit-xml=$(ARTIFACT_DIR)/report.xml --disable-warnings -vv --gherkin-terminal-reporter --kube-config=$${HOME}/.kube/config --alluredir=$(ARTIFACT_DIR)/allure-results . | tee $(ARTIFACT_DIR)/report.md + pytest -s -x -m 'mindwm_lifecycle and mindmap_terminal' --no-header --junit-xml=$(ARTIFACT_DIR)/report.xml --disable-warnings -vv --gherkin-terminal-reporter --kube-config=$${HOME}/.kube/config --alluredir=$(ARTIFACT_DIR)/allure-results . | tee $(ARTIFACT_DIR)/report.md exit_code=$${PIPESTATUS[0]} echo $${exit_code} > $(ARTIFACT_DIR)/exit_code xmlstarlet sel -t -m "//testcase[failure]" -v "concat(@classname,' ', @name)" -n $(ARTIFACT_DIR)/report.xml | tee $(ARTIFACT_DIR)/failed_test_title From afcb92b4740a8da0c2e7fd0b81337e7ab8f3281a Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Tue, 18 Feb 2025 00:49:09 +0100 Subject: [PATCH 05/14] fix(pytest): test list --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 93b0d2d2..241bec01 100644 --- a/Makefile +++ b/Makefile @@ -260,7 +260,7 @@ mindwm_test: python3 -m venv .venv && \ source .venv/bin/activate && \ pip3 install -r ./requirements.txt && \ - pytest -s -x -m 'mindwm_lifecycle and mindmap_terminal' --no-header --junit-xml=$(ARTIFACT_DIR)/report.xml --disable-warnings -vv --gherkin-terminal-reporter --kube-config=$${HOME}/.kube/config --alluredir=$(ARTIFACT_DIR)/allure-results . | tee $(ARTIFACT_DIR)/report.md + pytest -s -x -m 'mindwm_lifecycle or mindmap_terminal' --no-header --junit-xml=$(ARTIFACT_DIR)/report.xml --disable-warnings -vv --gherkin-terminal-reporter --kube-config=$${HOME}/.kube/config --alluredir=$(ARTIFACT_DIR)/allure-results . | tee $(ARTIFACT_DIR)/report.md exit_code=$${PIPESTATUS[0]} echo $${exit_code} > $(ARTIFACT_DIR)/exit_code xmlstarlet sel -t -m "//testcase[failure]" -v "concat(@classname,' ', @name)" -n $(ARTIFACT_DIR)/report.xml | tee $(ARTIFACT_DIR)/failed_test_title From 8bba9030ace02842ff42157cb86eefe882d631a2 Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Tue, 18 Feb 2025 01:07:56 +0100 Subject: [PATCH 06/14] fix(mindmap-terminal): add missing xterm dependency --- tests/e2e/cloud-init.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/e2e/cloud-init.yaml b/tests/e2e/cloud-init.yaml index c5776e13..5fa49d0f 100644 --- a/tests/e2e/cloud-init.yaml +++ b/tests/e2e/cloud-init.yaml @@ -20,6 +20,7 @@ packages: - xvfb - wget - openjdk-17-jdk + - xterm groups: - ci - docker From a9f3cda0f8d4aa536b54629fd5bc76c654cf7da6 Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Tue, 18 Feb 2025 01:33:09 +0100 Subject: [PATCH 07/14] fix(mindmap-terminal): wrong username --- .../features/6_0_0_mindmap_terminal_freeplane.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature index f09f9957..33eee5a6 100644 --- a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature +++ b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature @@ -36,7 +36,7 @@ Feature: Mindmap terminal integration test Examples: | context | username | host | - | headwind | bebebeka | ubuntu-dev | + | headwind | ci | localhost | Scenario: Clone @ to When God clones the repository '' with branch '' and commit '' to '' From 055d0cf1235973f95bc1c3831d2d3c1ed240a2ea Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Tue, 18 Feb 2025 01:33:57 +0100 Subject: [PATCH 08/14] feat(mindmap-terminal): add cleanup section --- .../features/6_0_0_mindmap_terminal_freeplane.feature | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature index 33eee5a6..59d91bca 100644 --- a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature +++ b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature @@ -105,3 +105,13 @@ Feature: Mindmap terminal integration test Examples: | context | username | host | | headwind | ci | localhost | + + Scenario: Cleanup @ in + # TODO(@metacoma) cleanup tmux session + When God deletes the MindWM host resource "" + When God deletes the MindWM user resource "" + When God deletes the MindWM context resource "" + + Examples: + | context | username | host | + | headwind | ci | localhost | From 816abf94e0089b1bb3f05d59bd04acb24715f1e2 Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Tue, 18 Feb 2025 20:45:54 +0100 Subject: [PATCH 09/14] chore(knfunc-kafka-cdc): bump to version 1.0.5 --- config_schema.k | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_schema.k b/config_schema.k index 21733d7e..d3a9bda0 100644 --- a/config_schema.k +++ b/config_schema.k @@ -87,7 +87,7 @@ schema MindwmContext: } kafka_cdc: KnativeFunction { name.data = "kafka-cdc" - image = "ghcr.io/mindwm/knfunc-kafka-cdc:1.0.4" + image = "ghcr.io/mindwm/knfunc-kafka-cdc:1.0.5" } pong: KnativeFunction { name.data = "pong" From df0fcba091c2602e98725ac8d42b0f6cbedbe577 Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Tue, 18 Feb 2025 21:27:38 +0100 Subject: [PATCH 10/14] feat: pass neo4j node id to graph relationship change events --- config_schema.k | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_schema.k b/config_schema.k index d3a9bda0..962d74a5 100644 --- a/config_schema.k +++ b/config_schema.k @@ -87,7 +87,7 @@ schema MindwmContext: } kafka_cdc: KnativeFunction { name.data = "kafka-cdc" - image = "ghcr.io/mindwm/knfunc-kafka-cdc:1.0.5" + image = "ghcr.io/mindwm/knfunc-kafka-cdc:1.0.6" } pong: KnativeFunction { name.data = "pong" From 5229be481754ae006847afda452d8a07a2c6865e Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Fri, 21 Feb 2025 14:59:30 +0100 Subject: [PATCH 11/14] feat(mindmap-terminal): parametrize command in gherkin scenario --- .../features/6_0_0_mindmap_terminal_freeplane.feature | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature index 59d91bca..bb2db280 100644 --- a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature +++ b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature @@ -86,12 +86,12 @@ Feature: Mindmap terminal integration test Then God waits for '3' seconds When God runs the command 'export DISPLAY=:; xdotool key Escape' inside the '' directory Then God waits for '3' seconds - When God runs the command 'export DISPLAY=:; xdotool type "uptime"' inside the '' directory + When God runs the command 'export DISPLAY=:; xdotool type ""' inside the '' directory Then God waits for '3' seconds When God runs the command 'export DISPLAY=:; xdotool key Return' inside the '' directory Examples: - | work_dir | display | - | /tmp/mindmap-terminal | 42 | + | work_dir | display | command | + | /tmp/mindmap-terminal | 42 | uptime | # # Scenario: Verification that the io-document has been delivered and processed @@ -103,8 +103,8 @@ Feature: Mindmap terminal integration test And container "user-container" in pod "^dead-letter-.*" in namespace "context-" should not contain "cloudevents.Event\n" regex Examples: - | context | username | host | - | headwind | ci | localhost | + | context | username | host | command | + | headwind | ci | localhost | uptime | Scenario: Cleanup @ in # TODO(@metacoma) cleanup tmux session From 11afecc483edd4495ff72124f0b21e83bfa55f59 Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Fri, 21 Feb 2025 15:02:07 +0100 Subject: [PATCH 12/14] feat(mindwmap-temrinal): uninstall freeplane in cleanup scenario --- .../mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature index bb2db280..03df1fc5 100644 --- a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature +++ b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature @@ -111,6 +111,7 @@ Feature: Mindmap terminal integration test When God deletes the MindWM host resource "" When God deletes the MindWM user resource "" When God deletes the MindWM context resource "" + When God runs the command 'sudo dpkg remove freeplane' inside the '/tmp' directory Examples: | context | username | host | From 014119dddda380444acc1321c5a79cac875b1cd0 Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Fri, 21 Feb 2025 15:28:39 +0100 Subject: [PATCH 13/14] feat(mindmap-terminal): parametrize freeplane version Kill tests process and uninstall freeplane in cleanup scenario --- .../6_0_0_mindmap_terminal_freeplane.feature | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature index 03df1fc5..3d5697e8 100644 --- a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature +++ b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature @@ -7,11 +7,11 @@ Feature: Mindmap terminal integration test Then all nodes in Kubernetes are ready Scenario: Install freeplane - When God runs the command 'wget -c -O /tmp/freeplane.deb https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_1.12.9~upstream-1_all.deb/download' inside the '' directory + When God runs the command 'wget -c -O /tmp/freeplane.deb https://sourceforge.net/projects/freeplane/files/freeplane%20stable/archive//freeplane_1.12.9~upstream-1_all.deb/download' inside the '' directory When God runs the command 'sudo dpkg -i /freeplane.deb' inside the '' directory Examples: - | work_dir | display | - | /tmp/ | 42 | + | freeplane_version | work_dir | display | + | 1.12.9 | /tmp/ | 42 | Scenario: Prepare environment, context: , username: , host: @@ -75,6 +75,7 @@ Feature: Mindmap terminal integration test When God runs the command 'export DISPLAY=:; make freeplane_start > /log 2>&1 &' inside the '' directory Then God waits for '10' seconds When God runs the command 'DISPLAY=: wmctrl -l | grep Freeplane' inside the '' directory + Then God waits for '20' seconds When God runs the command 'DISPLAY=: wmctrl -l | grep -E "mindmap-terminal-[0-9]+-Map[0-9]+?-ID_[0-9]+"' inside the '' directory Examples: @@ -107,11 +108,13 @@ Feature: Mindmap terminal integration test | headwind | ci | localhost | uptime | Scenario: Cleanup @ in - # TODO(@metacoma) cleanup tmux session When God deletes the MindWM host resource "" - When God deletes the MindWM user resource "" - When God deletes the MindWM context resource "" - When God runs the command 'sudo dpkg remove freeplane' inside the '/tmp' directory + And God deletes the MindWM user resource "" + And God deletes the MindWM context resource "" + And God runs the command 'sudo dpkg -r freeplane' inside the '/tmp' directory + And God runs the command 'pkill -9 -f Xvfb' inside the '/tmp' directory + And God runs the command 'pkill -9 -f fvwm3' inside the '/tmp' directory + And God runs the command 'pkill -9 -f xterm' inside the '/tmp' directory Examples: | context | username | host | From e9621e510bb997b7d23f03c1aba2457c2809e786 Mon Sep 17 00:00:00 2001 From: Sergey Ryabin Date: Fri, 21 Feb 2025 16:09:11 +0100 Subject: [PATCH 14/14] feat(mindmap-temrinal): split the cleanup scenario into two parts --- .../6_0_0_mindmap_terminal_freeplane.feature | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature index 3d5697e8..6b767b98 100644 --- a/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature +++ b/tests/mindwm_bdd/features/6_0_0_mindmap_terminal_freeplane.feature @@ -37,7 +37,7 @@ Feature: Mindmap terminal integration test Examples: | context | username | host | | headwind | ci | localhost | - + Scenario: Clone @ to When God clones the repository '' with branch '' and commit '' to '' Then the directory '' should exist @@ -60,7 +60,7 @@ Feature: Mindmap terminal integration test Examples: | work_dir | | /tmp/mindwm-manager | - # + Scenario: Run xvfb server at : port When God runs the command 'nohup Xvfb : -screen 0 1024x768x16 > /tmp/x 2>&1 &' inside the '' directory When God runs the command 'nohup fvwm3 -d : >/tmp/y 2>&1 &' inside the '' directory @@ -70,7 +70,7 @@ Feature: Mindmap terminal integration test Examples: | display | work_dir | | 42 | /tmp | - # + Scenario: Run freeplane When God runs the command 'export DISPLAY=:; make freeplane_start > /log 2>&1 &' inside the '' directory Then God waits for '10' seconds @@ -104,18 +104,25 @@ Feature: Mindmap terminal integration test And container "user-container" in pod "^dead-letter-.*" in namespace "context-" should not contain "cloudevents.Event\n" regex Examples: - | context | username | host | command | - | headwind | ci | localhost | uptime | + | context | username | host | command | + | headwind | ci | localhost | uptime | + + Scenario: Cleanup process + When God runs the command 'pgrep -f "" && (pkill -9 -f "") || :' inside the '/tmp' directory + Examples: + | proc_mask | + | ^Xvfb | + | ^fvwm3 | + | ^xterm | + | ^//tmp/mindwm-manager/.venv/bin/python3.11 src/manager.py$ | + Scenario: Cleanup @ in - When God deletes the MindWM host resource "" + When God deletes the MindWM context resource "" + And God deletes the MindWM host resource "" And God deletes the MindWM user resource "" - And God deletes the MindWM context resource "" And God runs the command 'sudo dpkg -r freeplane' inside the '/tmp' directory - And God runs the command 'pkill -9 -f Xvfb' inside the '/tmp' directory - And God runs the command 'pkill -9 -f fvwm3' inside the '/tmp' directory - And God runs the command 'pkill -9 -f xterm' inside the '/tmp' directory Examples: - | context | username | host | - | headwind | ci | localhost | + | context | username | host | + | headwind | ci | localhost |