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

feat: two context scenario #127

Merged
merged 5 commits into from
Oct 7, 2024
Merged

feat: two context scenario #127

merged 5 commits into from
Oct 7, 2024

Conversation

metacoma
Copy link
Contributor

@metacoma metacoma commented Oct 3, 2024

No description provided.

Copy link

github-actions bot commented Oct 3, 2024

allure report

gherkin outptut ============================= test session starts ============================== collecting ... collected 48 items

Feature: Mindwm Lifecycle Management
Scenario: Deploy Mindwm Cluster and Applications
Given an Ubuntu 24.04 system with 6 CPUs and 16 GB of RAM (PASSED)
And the mindwm-gitops repository is cloned into the "~/mindwm-gitops" directory (PASSED)
When God executes "make cluster" (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God executes "make argocd" (PASSED)
Then helm release "argocd" is deployed in "argocd" namespace (PASSED)
When God executes "make argocd_app" (PASSED)
Then the argocd "mindwm-gitops" application appears in "argocd" namespace (PASSED)
When God executes "make argocd_app_sync_async" (PASSED)
Then the argocd "mindwm-gitops" application is argocd namespace in a progressing status (PASSED)
When God executes "make argocd_app_async_wait" (PASSED)
Then all argocd applications are in a healthy state (PASSED)
When God executes "make crossplane_rolebinding_workaround" (PASSED)
Then the following roles should exist: (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Knative
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "knative-serving" should exists (PASSED)
And namespace "knative-eventing" should exists (PASSED)
And namespace "knative-operator" should exists (PASSED)
And following deployments is in ready state in "knative-serving" namespace (PASSED)
And following deployments is in ready state in "knative-eventing" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Istio
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "istio-system" should exists (PASSED)
And following deployments is in ready state in "istio-system" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Redpanda
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "redpanda" should exists (PASSED)
And following deployments is in ready state in "redpanda" namespace (PASSED)
And helm release "neo4j-cdc" is deployed in "redpanda" namespace (PASSED)
And statefulset "neo4j-cdc" in namespace "redpanda" is in ready state (PASSED)
And following deployments is in ready state in "redpanda" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Cert manager
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "cert-manager" should exists (PASSED)
And following deployments is in ready state in "cert-manager" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Nats
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "nats" should exists (PASSED)
And following deployments is in ready state in "nats" namespace (PASSED)
And statefulset "nats" in namespace "nats" is in ready state (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Monitoring
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "monitoring" should exists (PASSED)
And following deployments is in ready state in "monitoring" namespace (PASSED)
And statefulset "loki" in namespace "monitoring" is in ready state (PASSED)
And statefulset "tempo" in namespace "monitoring" is in ready state (PASSED)
And statefulset "vmalertmanager-vm-aio-victoria-metrics-k8s-stack" in namespace "monitoring" is in ready state (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create Context
Given a MindWM environment (PASSED)
When God creates a MindWM context with the name "xxx3" (PASSED)
Then the context should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create User
Given a MindWM environment (PASSED)
When God creates a MindWM user resource with the name "alice" and connects it to the context "xxx3" (PASSED)
Then the user resource should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create Host
Given a MindWM environment (PASSED)
When God creates a MindWM host resource with the name "laptop" and connects it to the user "alice" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Delete Resources and Verify Cleanup
Given a MindWM environment (PASSED)
When God deletes the MindWM host resource "laptop" (PASSED)
Then the host "laptop" should be deleted (PASSED)
When God deletes the MindWM user resource "alice" (PASSED)
Then the user "alice" should be deleted (PASSED)
When God deletes the MindWM context resource "xxx3" (PASSED)
Then the context "xxx3" should be deleted (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create Context and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "cyan" (PASSED)
Then the context should be ready and operable (PASSED)
And namespace "context-cyan" should exists (PASSED)
And helm release "cyan-neo4j" is deployed in "context-cyan" namespace (PASSED)
And statefulset "cyan-neo4j" in namespace "context-cyan" is in ready state (PASSED)
And following knative service is in ready state in "context-cyan" namespace (PASSED)
And following knative triggers is in ready state in "context-cyan" namespace (PASSED)
And following knative brokers is in ready state in "context-cyan" namespace (PASSED)
And kafka topic "context-cyan-cdc" is in ready state in "redpanda" namespace (PASSED)
And kafka source "context-cyan-cdc-kafkasource" is in ready state in "context-cyan" namespace (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create User and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM user resource with the name "bob" and connects it to the context "cyan" (PASSED)
Then the user resource should be ready and operable (PASSED)
And namespace "user-bob" should exists (PASSED)
And following knative brokers is in ready state in "user-bob" namespace (PASSED)
And following knative triggers is in ready state in "context-cyan" namespace (PASSED)
And following knative triggers is in ready state in "user-bob" namespace (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create Host and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "workstation" and connects it to the user "bob" (PASSED)
Then the host resource should be ready and operable (PASSED)
And NatsJetStreamChannel "workstation-host-broker-kne-trigger" is ready in "user-bob" namespace (PASSED)
And following knative triggers is in ready state in "user-bob" namespace (PASSED)
And following knative brokers is in ready state in "user-bob" namespace (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Delete Resources and Verify Cleanup
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "workstation" (PASSED)
Then the host "workstation" should be deleted (PASSED)
When God deletes the MindWM user resource "bob" (PASSED)
Then the user "bob" should be deleted (PASSED)
And namespace "user-bob" should not exists (PASSED)
When God deletes the MindWM context resource "cyan" (PASSED)
Then the context "cyan" should be deleted (PASSED)
And namespace "context-cyan" should not exists (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Prepare environment for ping tests
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "green4" (PASSED)
Then the context should be ready and operable (PASSED)
And following knative service is in ready state in "context-green4" namespace (PASSED)
When God creates a MindWM user resource with the name "amanda4" and connects it to the context "green4" (PASSED)
Then the user resource should be ready and operable (PASSED)
When God creates a MindWM host resource with the name "pi6-host" and connects it to the user "amanda4" (PASSED)
Then the host resource should be ready and operable (PASSED)
And NatsJetStreamChannel "pi6-host-host-broker-kne-trigger" is ready in "user-amanda4" namespace (PASSED)
When God starts reading message from NATS topic ">" (PASSED)
PASSED
Connected to NATS server at nats://root:[email protected]:4222
Subscribed to topic '>'

Feature: MindWM Ping-pong EDA test
Scenario: Send pind to knative ping service
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sends cloudevent to knative service "pong" in "context-green4" namespace (PASSED)
Then the response http code should be "200" (PASSED)
Then following deployments is in ready state in "context-green4" namespace (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Send ping via broker-ingress.knative-eventing/context-green4/context-broker
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "traceparent" to "00-5df92f3577b34da6a3ce929d0e0e4734-00f067aa0ba902b7-00" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sends cloudevent to "broker-ingress.knative-eventing/context-green4/context-broker" (PASSED)
Then the response http code should be "202" (PASSED)
Then following deployments is in ready state in "context-green4" namespace (PASSED)
Then the trace with "00-5df92f3577b34da6a3ce929d0e0e4734-00f067aa0ba902b7-00" should appear in TraceQL (PASSED)
And the trace should contains (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-amanda4.pi6-host-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Send ping via broker-ingress.knative-eventing/user-amanda4/user-broker
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "traceparent" to "00-6df93f3577b34da6a3ce929d0e0e4742-00f067aa0ba902b7-00" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sends cloudevent to "broker-ingress.knative-eventing/user-amanda4/user-broker" (PASSED)
Then the response http code should be "202" (PASSED)
Then following deployments is in ready state in "context-green4" namespace (PASSED)
Then the trace with "00-6df93f3577b34da6a3ce929d0e0e4742-00f067aa0ba902b7-00" should appear in TraceQL (PASSED)
And the trace should contains (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-amanda4.pi6-host-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Send ping via nats
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.36.23.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.3623.iodocument" (PASSED)
Then following deployments is in ready state in "context-green4" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-amanda4.pi6-host-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Cleanup amanda4@pi6-host in green4
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "pi6-host" (PASSED)
Then the host "pi6-host" should be deleted (PASSED)
When God deletes the MindWM user resource "amanda4" (PASSED)
When God deletes the MindWM context resource "green4" (PASSED)
PASSED

<Record n=<Node element_id='1' labels=frozenset({'Host'}) properties={'hostname': 'tablet', 'atime': 0, 'traceparent': '00-7df92f3577b34da6a3ce930d0e0e4734-4e7e7866f2645d58-01', 'type': 'org.mindwm.v1.graph.node.host'}>>
<Record n=<Node element_id='5' labels=frozenset({'IoDocument'}) properties={'output': 'uid=1000(pion) gid=1000(pion) groups=1000(pion),4(adm),100(users),112(tmux),988(docker)', 'input': 'id', 'atime': 0, 'traceparent': '00-7df92f3577b34da6a3ce930d0e0e4734-4e7e7866f2645d58-01', 'type': 'org.mindwm.v1.graph.node.iodocument', 'uuid': '97249ecf5f3a41309a91838bc6dcceed', 'ps1': 'pion@mindwm-stg1:~/work/dev/mindwm-manager$'}>>

Feature: MindWM io context function test
Scenario: io context red
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "red" (PASSED)
Then the context should be ready and operable (PASSED)
Then following knative service is in ready state in "context-red" namespace (PASSED)
And statefulset "red-neo4j" in namespace "context-red" is in ready state (PASSED)
When God creates a MindWM user resource with the name "kitty" and connects it to the context "red" (PASSED)
Then the user resource should be ready and operable (PASSED)
When God creates a MindWM host resource with the name "tablet" and connects it to the user "kitty" (PASSED)
Then the host resource should be ready and operable (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-id" to "442af213-c860-4535-b639-355f13b2d883" (PASSED)
And sets cloudevent header "traceparent" to "00-7df92f3577b34da6a3ce930d0e0e4734-00f064aa0ba902b8-00" (PASSED)
And sets cloudevent header "ce-subject" to "id" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.kitty.tablet.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sends cloudevent to "broker-ingress.knative-eventing/context-red/context-broker" (PASSED)
Then the response http code should be "202" (PASSED)
Then following deployments is in ready state in "context-red" namespace (PASSED)
Then the trace with "00-7df92f3577b34da6a3ce930d0e0e4734-00f064aa0ba902b8-00" should appear in TraceQL (PASSED)
And the trace should contains (PASSED)
Then graph have node "User" with property "username" = "kitty" in context "red" (PASSED)
And graph have node "Host" with property "hostname" = "tablet" in context "red" (PASSED)
And graph have node "IoDocument" with property "input" = "id" in context "red" (PASSED)
PASSED

Feature: MindWM io context function test
Scenario: Cleanup kitty@tablet in red
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "tablet" (PASSED)
Then the host "tablet" should be deleted (PASSED)
When God deletes the MindWM user resource "kitty" (PASSED)
When God deletes the MindWM context resource "red" (PASSED)
PASSED

Subscribed to topic '>'

Feature: MindWM kafka_cdc function test
Scenario: io context blue
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "blue" (PASSED)
Then the context should be ready and operable (PASSED)
Then following knative service is in ready state in "context-blue" namespace (PASSED)
And statefulset "blue-neo4j" in namespace "context-blue" is in ready state (PASSED)
When God creates a MindWM user resource with the name "garmr" and connects it to the context "blue" (PASSED)
Then the user resource should be ready and operable (PASSED)
When God creates a MindWM host resource with the name "helheim" and connects it to the user "garmr" (PASSED)
Then the host resource should be ready and operable (PASSED)
When God starts reading message from NATS topic ">" (PASSED)
And God makes graph query in context "blue" (PASSED)
Then following knative service is in ready state in "context-blue" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.graph.created" should have been received from the NATS topic "user-garmr.helheim-host-broker-kne-trigger._knative" (PASSED)
When God makes graph query in context "blue" (PASSED)
Then following knative service is in ready state in "context-blue" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.graph.updated" should have been received from the NATS topic "user-garmr.helheim-host-broker-kne-trigger._knative" (PASSED)
When God makes graph query in context "blue" (PASSED)
Then following knative service is in ready state in "context-blue" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.graph.deleted" should have been received from the NATS topic "user-garmr.helheim-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM kafka_cdc function test
Scenario: Cleanup garmr@helheim in blue
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "helheim" (PASSED)
Then the host "helheim" should be deleted (PASSED)
When God deletes the MindWM user resource "garmr" (PASSED)
When God deletes the MindWM context resource "blue" (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Create context varanasi and user shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "varanasi" (PASSED)
Then the context should be ready and operable (PASSED)
Then following knative service is in ready state in "context-varanasi" namespace (PASSED)
And statefulset "varanasi-neo4j" in namespace "context-varanasi" is in ready state (PASSED)
When God creates a MindWM user resource with the name "shesha" and connects it to the context "varanasi" (PASSED)
Then the user resource should be ready and operable (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Create workstation01 for user shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "workstation01" and connects it to the user "shesha" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Create travellaptop for user shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "travellaptop" and connects it to the user "shesha" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Subscribed to topic '>'

Feature: MindWM two hosts one user function test
Scenario: Send ping via nats host: workstation01, user: shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And God starts reading message from NATS topic ">" (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.shesha.workstation01.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.36.23.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.shesha.workstation01.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.36.23.iodocument" (PASSED)
Then following deployments is in ready state in "context-varanasi" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-shesha.workstation01-host-broker-kne-trigger._knative" (PASSED)
PASSED

Subscribed to topic '>'

Feature: MindWM two hosts one user function test
Scenario: Send ping via nats host: travellaptop, user: shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And God starts reading message from NATS topic ">" (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.shesha.travellaptop.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.36.23.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.shesha.travellaptop.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.36.23.iodocument" (PASSED)
Then following deployments is in ready state in "context-varanasi" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-shesha.travellaptop-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Send iodocument via nats host: workstation01, user: shesha and check that second host received graph the update
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "id" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.shesha.workstation01.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.36.23.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.shesha.workstation01.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.3623.iodocument" (PASSED)
Then following deployments is in ready state in "context-varanasi" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.graph.created" should have been received from the NATS topic "user-shesha.travellaptop-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Cleanup hosts workstation01 in user shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "workstation01" (PASSED)
Then the host "workstation01" should be deleted (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Cleanup hosts travellaptop in user shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "travellaptop" (PASSED)
Then the host "travellaptop" should be deleted (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Cleanup user shesha and context varanasi
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM user resource "shesha" (PASSED)
Then the user "shesha" should be deleted (PASSED)
When God deletes the MindWM context resource "varanasi" (PASSED)
Then the context "varanasi" should be deleted (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Create context tokyo
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "tokyo" (PASSED)
Then the context should be ready and operable (PASSED)
Then following knative service is in ready state in "context-tokyo" namespace (PASSED)
And statefulset "tokyo-neo4j" in namespace "context-tokyo" is in ready state (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Create godzilla and connects it to tokyo
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM user resource with the name "godzilla" and connects it to the context "tokyo" (PASSED)
Then the user resource should be ready and operable (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Create tengu and connects it to tokyo
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM user resource with the name "tengu" and connects it to the context "tokyo" (PASSED)
Then the user resource should be ready and operable (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Create laptop resource and connects it to godzilla user
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "laptop" and connects it to the user "godzilla" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Create tablet resource and connects it to tengu user
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "tablet" and connects it to the user "tengu" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Subscribed to topic '>'

Feature: MindWM two users one context function test
Scenario: Send iodocument via nats host: , user: and check that second user received graph update
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And God starts reading message from NATS topic ">" (PASSED)
And sets cloudevent header "ce-subject" to "id" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.godzilla.laptop.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.23.36.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.godzilla.laptop.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.23.36.iodocument" (PASSED)
Then following deployments is in ready state in "context-tokyo" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.graph.created" should have been received from the NATS topic "user-tengu.tablet-host-broker-kne-trigger._knative" (PASSED)
PASSED

Subscribed to topic '>'

Feature: MindWM two users one context function test
Scenario: Send iodocument via nats host: , user: and check that second user received graph update
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And God starts reading message from NATS topic ">" (PASSED)
And sets cloudevent header "ce-subject" to "id" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.tengu.tablet.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.23.36.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.tengu.tablet.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.23.36.iodocument" (PASSED)
Then following deployments is in ready state in "context-tokyo" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.graph.created" should have been received from the NATS topic "user-godzilla.laptop-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Cleanup laptop host for godzilla username
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "laptop" (PASSED)
Then the host "laptop" should be deleted (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Cleanup tablet host for tengu username
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "tablet" (PASSED)
Then the host "tablet" should be deleted (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Cleanup godzilla username
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM user resource "godzilla" (PASSED)
Then the user "godzilla" should be deleted (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Cleanup tengu username
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM user resource "tengu" (PASSED)
Then the user "tengu" should be deleted (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Cleanup tokyo context
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM context resource "tokyo" (PASSED)
Then the context "tokyo" should be deleted (PASSED)
PASSED

Feature: Context Resource Readiness Verification
Scenario: Create Contexts and Verify All Related Resources Are in Ready State
Given a MindWM environment (PASSED)
FAILED

=================================== FAILURES ===================================
_ test_scenarios[file:features/8_two_contexts.feature-Context Resource Readiness Verification-Create Contexts and Verify All Related Resources Are in Ready State[table_rows:[line: 50]]] _

self = <pytest_bdd.runner.ScenarioRunner object at 0x70b114a3f9e0>
step = PickleStep(argument=None, ast_node_ids=['878'], id='911', type=<Type.context: 'Context'>, text='all nodes in Kubernetes are ready')
previous_step = PickleStep(argument=None, ast_node_ids=['877'], id='910', type=<Type.context: 'Context'>, text='a MindWM environment')

def _match_to_step(self, step, previous_step):
    try:
      return self.request.config.hook.pytest_bdd_match_step_definition_to_step(
            request=self.request,
            feature=self.feature,
            scenario=self.scenario,
            step=step,
            previous_step=previous_step,
        )

.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:181:


.venv/lib/python3.12/site-packages/pytest_bdd/plugin.py:350: in pytest_bdd_match_step_definition_to_step
return step_matcher(request, feature, scenario, step, previous_step, step_registry)


self = StepHandler.Matcher(config=<_pytest.config.Config object at 0x70b118536510>, feature=Feature(gherkin_document=GherkinD...ures=[], liberal=None, id=NOTHING, Definition__cache={})}, parent=None)), step_type_context=<Type.context: 'Context'>)
request = <FixtureRequest for <Function test_scenarios[file:features/8_two_contexts.feature-Context Resource Readiness Verification-Create Contexts and Verify All Related Resources Are in Ready State[table_rows:[line: 50]]]>>
feature = Feature(gherkin_document=GherkinDocument(uri='file:features/8_two_contexts.feature', feature=Feature(location=Location...ontext-context2" namespace')], tags=[PickleTag(name='@mindwm_test', ast_node_id='909')], ast_node_ids=['908', '906'])])
pickle = Pickle(id='922', uri='file:features/8_two_contexts.feature', name='Create Contexts and Verify All Related Resources Ar..."context-context1" namespace')], tags=[PickleTag(name='@mindwm_test', ast_node_id='909')], ast_node_ids=['908', '905'])
step = PickleStep(argument=None, ast_node_ids=['878'], id='911', type=<Type.context: 'Context'>, text='all nodes in Kubernetes are ready')
previous_step = PickleStep(argument=None, ast_node_ids=['877'], id='910', type=<Type.context: 'Context'>, text='a MindWM environment')
step_registry = StepHandler.Registry(registry={StepHandler.Definition(func=<function mindwm_host_create at 0x70b112d0f100>, type
=<Typ...s_mapping=True, param_defaults={}, target_fixtures=[], liberal=None, id=NOTHING, _Definition__cache={})}, parent=None))

def __call__(
    self,
    request,
    feature: Feature,
    pickle: Pickle,
    step: Step,
    previous_step: Optional[Step],
    step_registry: "StepHandler.Registry",
) -> "StepHandler.Definition":
    self.request = request
    self.feature = feature
    self.pickle = pickle
    self.step = step
    self.previous_step = previous_step
    self.step_registry = step_registry

    self.step_type_context = (
        self.step_type_context
        if self.step.type is StepType.unknown and self.step_type_context is not None
        else self.step.type
    )

    step_definitions = list(
        self.find_step_definition_matches(
            self.step_registry, (self.strict_matcher, self.unspecified_matcher, self.liberal_matcher)
        )
    )

    if len(step_definitions) > 0:
        if len(step_definitions) > 1:
            warn(PytestBDDStepDefinitionWarning(f"Alternative step definitions are found: {step_definitions}"))
        return step_definitions[0]
  raise self.MatchNotFoundError(self.step.text)

E pytest_bdd.steps.StepHandler.Matcher.MatchNotFoundError: all nodes in Kubernetes are ready

.venv/lib/python3.12/site-packages/pytest_bdd/steps.py:295: MatchNotFoundError

The above exception was the direct cause of the following exception:

self = <pytest_bdd.runner.ScenarioRunner object at 0x70b114a3f9e0>
item = <Function test_scenarios[file:features/8_two_contexts.feature-Context Resource Readiness Verification-Create Contexts and Verify All Related Resources Are in Ready State[table_rows:[line: 50]]]>

def pytest_runtest_call(self, item: Item):
    if "pytest_bdd_scenario" in list(map(attrgetter("name"), item.iter_markers())):
        self.request = item._request
        self.feature = self.request.getfixturevalue("feature")
        self.scenario = self.request.getfixturevalue("scenario")
        self.plugin_manager = self.request.config.hook
        self.plugin_manager.pytest_bdd_before_scenario(
            request=self.request, feature=self.feature, scenario=self.scenario
        )
        try:
          self.plugin_manager.pytest_bdd_run_scenario(
                request=self.request,
                feature=self.feature,
                scenario=self.scenario,
            )

.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:37:


.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:59: in pytest_bdd_run_scenario
return step_dispatcher(steps)
.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:69: in dispatcher
self.plugin_manager.pytest_bdd_run_step(
.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:104: in pytest_bdd_run_step
step_definition = self._match_to_step(step, previous_step)


self = <pytest_bdd.runner.ScenarioRunner object at 0x70b114a3f9e0>
step = PickleStep(argument=None, ast_node_ids=['878'], id='911', type=<Type.context: 'Context'>, text='all nodes in Kubernetes are ready')
previous_step = PickleStep(argument=None, ast_node_ids=['877'], id='910', type=<Type.context: 'Context'>, text='a MindWM environment')

def _match_to_step(self, step, previous_step):
    try:
        return self.request.config.hook.pytest_bdd_match_step_definition_to_step(
            request=self.request,
            feature=self.feature,
            scenario=self.scenario,
            step=step,
            previous_step=previous_step,
        )
    except StepHandler.Matcher.MatchNotFoundError as e:
      raise exceptions.StepDefinitionNotFoundError(
            f'Step definition is not found: "{step.text}". '
            f'Step keyword: "{step.keyword}". '
            f"Line {step.line_number} "
            f'in scenario "{self.scenario.name}" '
            f'in the feature "{self.feature.uri}"'
        ) from e

E pytest_bdd.exceptions.StepDefinitionNotFoundError: Step definition is not found: "all nodes in Kubernetes are ready". Step keyword: "And". Line 6 in scenario "Create Contexts and Verify All Related Resources Are in Ready State" in the feature "file:features/8_two_contexts.feature"

.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:189: StepDefinitionNotFoundError
=========================== short test summary info ============================
FAILED features/8_two_contexts.feature::test_scenarios[file:features/8_two_contexts.feature-Context Resource Readiness Verification-Create Contexts and Verify All Related Resources Are in Ready State[table_rows:[line: 50]]] - pytest_bdd.exceptions.StepDefinitionNotFoundError: Step definition is not found: "all nodes in Kubernetes are ready". Step keyword: "And". Line 6 in scenario "Create Contexts and Verify All Related Resources Are in Ready State" in the feature "file:features/8_two_contexts.feature"
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
============ 1 failed, 46 passed, 62 warnings in 2211.99s (0:36:51) ============

Copy link

github-actions bot commented Oct 4, 2024

allure report

gherkin outptut ============================= test session starts ============================== collecting ... collected 50 items

Feature: Mindwm Lifecycle Management
Scenario: Deploy Mindwm Cluster and Applications
Given an Ubuntu 24.04 system with 6 CPUs and 16 GB of RAM (PASSED)
And the mindwm-gitops repository is cloned into the "~/mindwm-gitops" directory (PASSED)
When God executes "make cluster" (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God executes "make argocd" (PASSED)
Then helm release "argocd" is deployed in "argocd" namespace (PASSED)
When God executes "make argocd_app" (PASSED)
Then the argocd "mindwm-gitops" application appears in "argocd" namespace (PASSED)
When God executes "make argocd_app_sync_async" (PASSED)
Then the argocd "mindwm-gitops" application is argocd namespace in a progressing status (PASSED)
When God executes "make argocd_app_async_wait" (PASSED)
Then all argocd applications are in a healthy state (PASSED)
When God executes "make crossplane_rolebinding_workaround" (PASSED)
Then the following roles should exist: (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Knative
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "knative-serving" should exist (PASSED)
And namespace "knative-eventing" should exist (PASSED)
And namespace "knative-operator" should exist (PASSED)
And the following deployments are in a ready state in the "knative-serving" namespace (PASSED)
And the following deployments are in a ready state in the "knative-eventing" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Istio
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "istio-system" should exist (PASSED)
And the following deployments are in a ready state in the "istio-system" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Redpanda
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "redpanda" should exist (PASSED)
And the following deployments are in a ready state in the "redpanda" namespace (PASSED)
And helm release "neo4j-cdc" is deployed in "redpanda" namespace (PASSED)
And statefulset "neo4j-cdc" in namespace "redpanda" is in ready state (PASSED)
And the following deployments are in a ready state in the "redpanda" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Cert manager
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "cert-manager" should exist (PASSED)
And the following deployments are in a ready state in the "cert-manager" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Nats
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "nats" should exist (PASSED)
And the following deployments are in a ready state in the "nats" namespace (PASSED)
And statefulset "nats" in namespace "nats" is in ready state (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Monitoring
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "monitoring" should exist (PASSED)
And the following deployments are in a ready state in the "monitoring" namespace (PASSED)
And statefulset "loki" in namespace "monitoring" is in ready state (PASSED)
And statefulset "tempo" in namespace "monitoring" is in ready state (PASSED)
And statefulset "vmalertmanager-vm-aio-victoria-metrics-k8s-stack" in namespace "monitoring" is in ready state (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create Context
Given a MindWM environment (PASSED)
When God creates a MindWM context with the name "xxx3" (PASSED)
Then the context should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create User
Given a MindWM environment (PASSED)
When God creates a MindWM user resource with the name "alice" and connects it to the context "xxx3" (PASSED)
Then the user resource should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create Host
Given a MindWM environment (PASSED)
When God creates a MindWM host resource with the name "laptop" and connects it to the user "alice" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Delete Resources and Verify Cleanup
Given a MindWM environment (PASSED)
When God deletes the MindWM host resource "laptop" (PASSED)
Then the host "laptop" should be deleted (PASSED)
When God deletes the MindWM user resource "alice" (PASSED)
Then the user "alice" should be deleted (PASSED)
When God deletes the MindWM context resource "xxx3" (PASSED)
Then the context "xxx3" should be deleted (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create Context and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "cyan" (PASSED)
Then the context should be ready and operable (PASSED)
And namespace "context-cyan" should exist (PASSED)
And helm release "cyan-neo4j" is deployed in "context-cyan" namespace (PASSED)
And statefulset "cyan-neo4j" in namespace "context-cyan" is in ready state (PASSED)
And the following knative services are in a ready state in the "context-cyan" namespace (PASSED)
And the following knative triggers are in a ready state in the "context-cyan" namespace (PASSED)
And the following knative brokers are in a ready state in the "context-cyan" namespace (PASSED)
And kafka topic "context-cyan-cdc" is in ready state in "redpanda" namespace (PASSED)
And kafka source "context-cyan-cdc-kafkasource" is in ready state in "context-cyan" namespace (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create User and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM user resource with the name "bob" and connects it to the context "cyan" (PASSED)
Then the user resource should be ready and operable (PASSED)
And namespace "user-bob" should exist (PASSED)
And the following knative brokers are in a ready state in the "user-bob" namespace (PASSED)
And the following knative triggers are in a ready state in the "context-cyan" namespace (PASSED)
And the following knative triggers are in a ready state in the "user-bob" namespace (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create Host and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "workstation" and connects it to the user "bob" (PASSED)
Then the host resource should be ready and operable (PASSED)
And NatsJetStreamChannel "workstation-host-broker-kne-trigger" is ready in "user-bob" namespace (PASSED)
And the following knative triggers are in a ready state in the "user-bob" namespace (PASSED)
And the following knative brokers are in a ready state in the "user-bob" namespace (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Delete Resources and Verify Cleanup
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "workstation" (PASSED)
Then the host "workstation" should be deleted (PASSED)
When God deletes the MindWM user resource "bob" (PASSED)
Then the user "bob" should be deleted (PASSED)
And namespace "user-bob" should not exist (PASSED)
When God deletes the MindWM context resource "cyan" (PASSED)
Then the context "cyan" should be deleted (PASSED)
And namespace "context-cyan" should not exist (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Prepare environment for ping tests
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "green4" (PASSED)
Then the context should be ready and operable (PASSED)
And the following knative services are in a ready state in the "context-green4" namespace (PASSED)
When God creates a MindWM user resource with the name "amanda4" and connects it to the context "green4" (PASSED)
Then the user resource should be ready and operable (PASSED)
When God creates a MindWM host resource with the name "pi6-host" and connects it to the user "amanda4" (PASSED)
Then the host resource should be ready and operable (PASSED)
And NatsJetStreamChannel "pi6-host-host-broker-kne-trigger" is ready in "user-amanda4" namespace (PASSED)
When God starts reading message from NATS topic ">" (PASSED)
PASSED
Connected to NATS server at nats://root:[email protected]:4222
Subscribed to topic '>'

Feature: MindWM Ping-pong EDA test
Scenario: Send pind to knative ping service
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sends cloudevent to knative service "pong" in "context-green4" namespace (PASSED)
Then the response http code should be "200" (PASSED)
Then the following deployments are in a ready state in the "context-green4" namespace (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Send ping via broker-ingress.knative-eventing/context-green4/context-broker
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "traceparent" to "00-5df92f3577b34da6a3ce929d0e0e4734-00f067aa0ba902b7-00" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sends cloudevent to "broker-ingress.knative-eventing/context-green4/context-broker" (PASSED)
Then the response http code should be "202" (PASSED)
Then the following deployments are in a ready state in the "context-green4" namespace (PASSED)
Then the trace with "00-5df92f3577b34da6a3ce929d0e0e4734-00f067aa0ba902b7-00" should appear in TraceQL (PASSED)
And the trace should contains (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-amanda4.pi6-host-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Send ping via broker-ingress.knative-eventing/user-amanda4/user-broker
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "traceparent" to "00-6df93f3577b34da6a3ce929d0e0e4742-00f067aa0ba902b7-00" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sends cloudevent to "broker-ingress.knative-eventing/user-amanda4/user-broker" (PASSED)
Then the response http code should be "202" (PASSED)
Then the following deployments are in a ready state in the "context-green4" namespace (PASSED)
Then the trace with "00-6df93f3577b34da6a3ce929d0e0e4742-00f067aa0ba902b7-00" should appear in TraceQL (PASSED)
And the trace should contains (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-amanda4.pi6-host-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Send ping via nats
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.36.23.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.3623.iodocument" (PASSED)
Then the following deployments are in a ready state in the "context-green4" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-amanda4.pi6-host-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Cleanup amanda4@pi6-host in green4
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "pi6-host" (PASSED)
Then the host "pi6-host" should be deleted (PASSED)
When God deletes the MindWM user resource "amanda4" (PASSED)
When God deletes the MindWM context resource "green4" (PASSED)
PASSED

Feature: MindWM io context function test
Scenario: io context red
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "red" (PASSED)
Then the context should be ready and operable (PASSED)
FAILED

=================================== FAILURES ===================================
_ test_scenarios[file:features/4_mindwm_io_context.feature-MindWM io context function test-io context red[table_rows:[line: 57]]] _

self = <pytest_bdd.runner.ScenarioRunner object at 0x749056f76660>
step = PickleStep(argument=PickleStepArgument(doc_string=None, data_table=PickleTable(rows=[PickleTableRow(cells=[PickleTable...pe=<Type.outcome: 'Outcome'>, text='following knative services are in in a ready state in the "context-red" namespace')
previous_step = PickleStep(argument=None, ast_node_ids=['453', '482'], id='498', type=<Type.outcome: 'Outcome'>, text='the context should be ready and operable')

def _match_to_step(self, step, previous_step):
    try:
      return self.request.config.hook.pytest_bdd_match_step_definition_to_step(
            request=self.request,
            feature=self.feature,
            scenario=self.scenario,
            step=step,
            previous_step=previous_step,
        )

.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:181:


.venv/lib/python3.12/site-packages/pytest_bdd/plugin.py:350: in pytest_bdd_match_step_definition_to_step
return step_matcher(request, feature, scenario, step, previous_step, step_registry)


self = StepHandler.Matcher(config=<_pytest.config.Config object at 0x74905b5fec00>, feature=Feature(gherkin_document=GherkinD...ures=[], liberal=None, id=NOTHING, Definition__cache={})}, parent=None)), step_type_context=<Type.outcome: 'Outcome'>)
request = <FixtureRequest for <Function test_scenarios[file:features/4_mindwm_io_context.feature-MindWM io context function test-io context red[table_rows:[line: 57]]]>>
feature = Feature(gherkin_document=GherkinDocument(uri='file:features/4_mindwm_io_context.feature', feature=Feature(location=Loc...dwm_io_context', ast_node_id='493'), PickleTag(name='@mindwm_test', ast_node_id='494')], ast_node_ids=['492', '490'])])
pickle = Pickle(id='519', uri='file:features/4_mindwm_io_context.feature', name='io context red', language='en', steps=[PickleS...indwm_io_context', ast_node_id='493'), PickleTag(name='@mindwm_test', ast_node_id='494')], ast_node_ids=['484', '482'])
step = PickleStep(argument=PickleStepArgument(doc_string=None, data_table=PickleTable(rows=[PickleTableRow(cells=[PickleTable...pe=<Type.outcome: 'Outcome'>, text='following knative services are in in a ready state in the "context-red" namespace')
previous_step = PickleStep(argument=None, ast_node_ids=['453', '482'], id='498', type=<Type.outcome: 'Outcome'>, text='the context should be ready and operable')
step_registry = StepHandler.Registry(registry={StepHandler.Definition(func=<function graph_query at 0x74905512cea0>, type
=<Type.actio...s_mapping=True, param_defaults={}, target_fixtures=[], liberal=None, id=NOTHING, _Definition__cache={})}, parent=None))

def __call__(
    self,
    request,
    feature: Feature,
    pickle: Pickle,
    step: Step,
    previous_step: Optional[Step],
    step_registry: "StepHandler.Registry",
) -> "StepHandler.Definition":
    self.request = request
    self.feature = feature
    self.pickle = pickle
    self.step = step
    self.previous_step = previous_step
    self.step_registry = step_registry

    self.step_type_context = (
        self.step_type_context
        if self.step.type is StepType.unknown and self.step_type_context is not None
        else self.step.type
    )

    step_definitions = list(
        self.find_step_definition_matches(
            self.step_registry, (self.strict_matcher, self.unspecified_matcher, self.liberal_matcher)
        )
    )

    if len(step_definitions) > 0:
        if len(step_definitions) > 1:
            warn(PytestBDDStepDefinitionWarning(f"Alternative step definitions are found: {step_definitions}"))
        return step_definitions[0]
  raise self.MatchNotFoundError(self.step.text)

E pytest_bdd.steps.StepHandler.Matcher.MatchNotFoundError: following knative services are in in a ready state in the "context-red" namespace

.venv/lib/python3.12/site-packages/pytest_bdd/steps.py:295: MatchNotFoundError

The above exception was the direct cause of the following exception:

self = <pytest_bdd.runner.ScenarioRunner object at 0x749056f76660>
item = <Function test_scenarios[file:features/4_mindwm_io_context.feature-MindWM io context function test-io context red[table_rows:[line: 57]]]>

def pytest_runtest_call(self, item: Item):
    if "pytest_bdd_scenario" in list(map(attrgetter("name"), item.iter_markers())):
        self.request = item._request
        self.feature = self.request.getfixturevalue("feature")
        self.scenario = self.request.getfixturevalue("scenario")
        self.plugin_manager = self.request.config.hook
        self.plugin_manager.pytest_bdd_before_scenario(
            request=self.request, feature=self.feature, scenario=self.scenario
        )
        try:
          self.plugin_manager.pytest_bdd_run_scenario(
                request=self.request,
                feature=self.feature,
                scenario=self.scenario,
            )

.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:37:


.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:59: in pytest_bdd_run_scenario
return step_dispatcher(steps)
.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:69: in dispatcher
self.plugin_manager.pytest_bdd_run_step(
.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:104: in pytest_bdd_run_step
step_definition = self._match_to_step(step, previous_step)


self = <pytest_bdd.runner.ScenarioRunner object at 0x749056f76660>
step = PickleStep(argument=PickleStepArgument(doc_string=None, data_table=PickleTable(rows=[PickleTableRow(cells=[PickleTable...pe=<Type.outcome: 'Outcome'>, text='following knative services are in in a ready state in the "context-red" namespace')
previous_step = PickleStep(argument=None, ast_node_ids=['453', '482'], id='498', type=<Type.outcome: 'Outcome'>, text='the context should be ready and operable')

def _match_to_step(self, step, previous_step):
    try:
        return self.request.config.hook.pytest_bdd_match_step_definition_to_step(
            request=self.request,
            feature=self.feature,
            scenario=self.scenario,
            step=step,
            previous_step=previous_step,
        )
    except StepHandler.Matcher.MatchNotFoundError as e:
      raise exceptions.StepDefinitionNotFoundError(
            f'Step definition is not found: "{step.text}". '
            f'Step keyword: "{step.keyword}". '
            f"Line {step.line_number} "
            f'in scenario "{self.scenario.name}" '
            f'in the feature "{self.feature.uri}"'
        ) from e

E pytest_bdd.exceptions.StepDefinitionNotFoundError: Step definition is not found: "following knative services are in in a ready state in the "context-red" namespace". Step keyword: "Then". Line 12 in scenario "io context red" in the feature "file:features/4_mindwm_io_context.feature"

.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:189: StepDefinitionNotFoundError
=========================== short test summary info ============================
FAILED features/4_mindwm_io_context.feature::test_scenarios[file:features/4_mindwm_io_context.feature-MindWM io context function test-io context red[table_rows:[line: 57]]] - pytest_bdd.exceptions.StepDefinitionNotFoundError: Step definition is not found: "following knative services are in in a ready state in the "context-red" namespace". Step keyword: "Then". Line 12 in scenario "io context red" in the feature "file:features/4_mindwm_io_context.feature"
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
============ 1 failed, 21 passed, 34 warnings in 1641.90s (0:27:21) ============

Copy link

github-actions bot commented Oct 4, 2024

allure report

gherkin outptut ============================= test session starts ============================== collecting ... collected 50 items

Feature: Mindwm Lifecycle Management
Scenario: Deploy Mindwm Cluster and Applications
Given an Ubuntu 24.04 system with 6 CPUs and 16 GB of RAM (PASSED)
And the mindwm-gitops repository is cloned into the "~/mindwm-gitops" directory (PASSED)
When God executes "make cluster" (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God executes "make argocd" (PASSED)
Then helm release "argocd" is deployed in "argocd" namespace (PASSED)
When God executes "make argocd_app" (PASSED)
Then the argocd "mindwm-gitops" application appears in "argocd" namespace (PASSED)
When God executes "make argocd_app_sync_async" (PASSED)
Then the argocd "mindwm-gitops" application is argocd namespace in a progressing status (PASSED)
When God executes "make argocd_app_async_wait" (PASSED)
Then all argocd applications are in a healthy state (PASSED)
When God executes "make crossplane_rolebinding_workaround" (PASSED)
Then the following roles should exist: (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Knative
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "knative-serving" should exist (PASSED)
And namespace "knative-eventing" should exist (PASSED)
And namespace "knative-operator" should exist (PASSED)
And the following deployments are in a ready state in the "knative-serving" namespace (PASSED)
And the following deployments are in a ready state in the "knative-eventing" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Istio
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "istio-system" should exist (PASSED)
And the following deployments are in a ready state in the "istio-system" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Redpanda
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "redpanda" should exist (PASSED)
And the following deployments are in a ready state in the "redpanda" namespace (PASSED)
And helm release "neo4j-cdc" is deployed in "redpanda" namespace (PASSED)
And statefulset "neo4j-cdc" in namespace "redpanda" is in ready state (PASSED)
And the following deployments are in a ready state in the "redpanda" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Cert manager
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "cert-manager" should exist (PASSED)
And the following deployments are in a ready state in the "cert-manager" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Nats
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "nats" should exist (PASSED)
And the following deployments are in a ready state in the "nats" namespace (PASSED)
And statefulset "nats" in namespace "nats" is in ready state (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Monitoring
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "monitoring" should exist (PASSED)
And the following deployments are in a ready state in the "monitoring" namespace (PASSED)
And statefulset "loki" in namespace "monitoring" is in ready state (PASSED)
And statefulset "tempo" in namespace "monitoring" is in ready state (PASSED)
And statefulset "vmalertmanager-vm-aio-victoria-metrics-k8s-stack" in namespace "monitoring" is in ready state (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create Context
Given a MindWM environment (PASSED)
When God creates a MindWM context with the name "xxx3" (PASSED)
Then the context should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create User
Given a MindWM environment (PASSED)
When God creates a MindWM user resource with the name "alice" and connects it to the context "xxx3" (PASSED)
Then the user resource should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create Host
Given a MindWM environment (PASSED)
When God creates a MindWM host resource with the name "laptop" and connects it to the user "alice" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Delete Resources and Verify Cleanup
Given a MindWM environment (PASSED)
When God deletes the MindWM host resource "laptop" (PASSED)
Then the host "laptop" should be deleted (PASSED)
When God deletes the MindWM user resource "alice" (PASSED)
Then the user "alice" should be deleted (PASSED)
When God deletes the MindWM context resource "xxx3" (PASSED)
Then the context "xxx3" should be deleted (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create Context and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "cyan" (PASSED)
Then the context should be ready and operable (PASSED)
And namespace "context-cyan" should exist (PASSED)
And helm release "cyan-neo4j" is deployed in "context-cyan" namespace (PASSED)
And statefulset "cyan-neo4j" in namespace "context-cyan" is in ready state (PASSED)
And the following knative services are in a ready state in the "context-cyan" namespace (PASSED)
And the following knative triggers are in a ready state in the "context-cyan" namespace (PASSED)
And the following knative brokers are in a ready state in the "context-cyan" namespace (PASSED)
And kafka topic "context-cyan-cdc" is in ready state in "redpanda" namespace (PASSED)
And kafka source "context-cyan-cdc-kafkasource" is in ready state in "context-cyan" namespace (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create User and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM user resource with the name "bob" and connects it to the context "cyan" (PASSED)
Then the user resource should be ready and operable (PASSED)
And namespace "user-bob" should exist (PASSED)
And the following knative brokers are in a ready state in the "user-bob" namespace (PASSED)
And the following knative triggers are in a ready state in the "context-cyan" namespace (PASSED)
And the following knative triggers are in a ready state in the "user-bob" namespace (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create Host and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "workstation" and connects it to the user "bob" (PASSED)
Then the host resource should be ready and operable (PASSED)
And NatsJetStreamChannel "workstation-host-broker-kne-trigger" is ready in "user-bob" namespace (PASSED)
And the following knative triggers are in a ready state in the "user-bob" namespace (PASSED)
And the following knative brokers are in a ready state in the "user-bob" namespace (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Delete Resources and Verify Cleanup
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "workstation" (PASSED)
Then the host "workstation" should be deleted (PASSED)
When God deletes the MindWM user resource "bob" (PASSED)
Then the user "bob" should be deleted (PASSED)
And namespace "user-bob" should not exist (PASSED)
When God deletes the MindWM context resource "cyan" (PASSED)
Then the context "cyan" should be deleted (PASSED)
And namespace "context-cyan" should not exist (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Prepare environment for ping tests
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "green4" (PASSED)
Then the context should be ready and operable (PASSED)
And the following knative services are in a ready state in the "context-green4" namespace (PASSED)
When God creates a MindWM user resource with the name "amanda4" and connects it to the context "green4" (PASSED)
Then the user resource should be ready and operable (PASSED)
When God creates a MindWM host resource with the name "pi6-host" and connects it to the user "amanda4" (PASSED)
Then the host resource should be ready and operable (PASSED)
And NatsJetStreamChannel "pi6-host-host-broker-kne-trigger" is ready in "user-amanda4" namespace (PASSED)
When God starts reading message from NATS topic ">" (PASSED)
PASSED
Connected to NATS server at nats://root:[email protected]:4222
Subscribed to topic '>'

Feature: MindWM Ping-pong EDA test
Scenario: Send pind to knative ping service
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sends cloudevent to knative service "pong" in "context-green4" namespace (PASSED)
Then the response http code should be "200" (PASSED)
Then the following deployments are in a ready state in the "context-green4" namespace (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Send ping via broker-ingress.knative-eventing/context-green4/context-broker
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "traceparent" to "00-5df92f3577b34da6a3ce929d0e0e4734-00f067aa0ba902b7-00" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sends cloudevent to "broker-ingress.knative-eventing/context-green4/context-broker" (PASSED)
Then the response http code should be "202" (PASSED)
Then the following deployments are in a ready state in the "context-green4" namespace (PASSED)
Then the trace with "00-5df92f3577b34da6a3ce929d0e0e4734-00f067aa0ba902b7-00" should appear in TraceQL (PASSED)
And the trace should contains (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-amanda4.pi6-host-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Send ping via broker-ingress.knative-eventing/user-amanda4/user-broker
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "traceparent" to "00-6df93f3577b34da6a3ce929d0e0e4742-00f067aa0ba902b7-00" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sends cloudevent to "broker-ingress.knative-eventing/user-amanda4/user-broker" (PASSED)
Then the response http code should be "202" (PASSED)
Then the following deployments are in a ready state in the "context-green4" namespace (PASSED)
Then the trace with "00-6df93f3577b34da6a3ce929d0e0e4742-00f067aa0ba902b7-00" should appear in TraceQL (PASSED)
And the trace should contains (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-amanda4.pi6-host-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Send ping via nats
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.36.23.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.3623.iodocument" (PASSED)
Then the following deployments are in a ready state in the "context-green4" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-amanda4.pi6-host-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Cleanup amanda4@pi6-host in green4
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "pi6-host" (PASSED)
Then the host "pi6-host" should be deleted (PASSED)
When God deletes the MindWM user resource "amanda4" (PASSED)
When God deletes the MindWM context resource "green4" (PASSED)
PASSED

<Record n=<Node element_id='1' labels=frozenset({'Host'}) properties={'hostname': 'tablet', 'atime': 0, 'traceparent': '00-7df92f3577b34da6a3ce930d0e0e4734-2fe145db26c92fb2-01', 'type': 'org.mindwm.v1.graph.node.host'}>>
<Record n=<Node element_id='5' labels=frozenset({'IoDocument'}) properties={'output': 'uid=1000(pion) gid=1000(pion) groups=1000(pion),4(adm),100(users),112(tmux),988(docker)', 'input': 'id', 'atime': 0, 'traceparent': '00-7df92f3577b34da6a3ce930d0e0e4734-2fe145db26c92fb2-01', 'type': 'org.mindwm.v1.graph.node.iodocument', 'uuid': 'abbed59bb4c74a18aef4837e0fefc842', 'ps1': 'pion@mindwm-stg1:~/work/dev/mindwm-manager$'}>>

Feature: MindWM io context function test
Scenario: io context red
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "red" (PASSED)
Then the context should be ready and operable (PASSED)
Then the following knative services are in a ready state in the "context-red" namespace (PASSED)
And statefulset "red-neo4j" in namespace "context-red" is in ready state (PASSED)
When God creates a MindWM user resource with the name "kitty" and connects it to the context "red" (PASSED)
Then the user resource should be ready and operable (PASSED)
When God creates a MindWM host resource with the name "tablet" and connects it to the user "kitty" (PASSED)
Then the host resource should be ready and operable (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-id" to "442af213-c860-4535-b639-355f13b2d883" (PASSED)
And sets cloudevent header "traceparent" to "00-7df92f3577b34da6a3ce930d0e0e4734-00f064aa0ba902b8-00" (PASSED)
And sets cloudevent header "ce-subject" to "id" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.kitty.tablet.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sends cloudevent to "broker-ingress.knative-eventing/context-red/context-broker" (PASSED)
Then the response http code should be "202" (PASSED)
Then the following deployments are in a ready state in the "context-red" namespace (PASSED)
Then the trace with "00-7df92f3577b34da6a3ce930d0e0e4734-00f064aa0ba902b8-00" should appear in TraceQL (PASSED)
And the trace should contains (PASSED)
Then graph have node "User" with property "username" = "kitty" in context "red" (PASSED)
And graph have node "Host" with property "hostname" = "tablet" in context "red" (PASSED)
And graph have node "IoDocument" with property "input" = "id" in context "red" (PASSED)
PASSED

Feature: MindWM io context function test
Scenario: Cleanup kitty@tablet in red
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "tablet" (PASSED)
Then the host "tablet" should be deleted (PASSED)
When God deletes the MindWM user resource "kitty" (PASSED)
When God deletes the MindWM context resource "red" (PASSED)
PASSED

Subscribed to topic '>'

Feature: MindWM kafka_cdc function test
Scenario: io context blue
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "blue" (PASSED)
Then the context should be ready and operable (PASSED)
Then the following knative services are in a ready state in the "context-blue" namespace (PASSED)
And statefulset "blue-neo4j" in namespace "context-blue" is in ready state (PASSED)
When God creates a MindWM user resource with the name "garmr" and connects it to the context "blue" (PASSED)
Then the user resource should be ready and operable (PASSED)
When God creates a MindWM host resource with the name "helheim" and connects it to the user "garmr" (PASSED)
Then the host resource should be ready and operable (PASSED)
When God starts reading message from NATS topic ">" (PASSED)
And God makes graph query in context "blue" (PASSED)
Then the following knative services are in a ready state in the "context-blue" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.graph.created" should have been received from the NATS topic "user-garmr.helheim-host-broker-kne-trigger._knative" (PASSED)
When God makes graph query in context "blue" (PASSED)
Then the following knative services are in a ready state in the "context-blue" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.graph.updated" should have been received from the NATS topic "user-garmr.helheim-host-broker-kne-trigger._knative" (PASSED)
When God makes graph query in context "blue" (PASSED)
Then the following knative services are in a ready state in the "context-blue" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.graph.deleted" should have been received from the NATS topic "user-garmr.helheim-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM kafka_cdc function test
Scenario: Cleanup garmr@helheim in blue
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "helheim" (PASSED)
Then the host "helheim" should be deleted (PASSED)
When God deletes the MindWM user resource "garmr" (PASSED)
When God deletes the MindWM context resource "blue" (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Create context varanasi and user shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "varanasi" (PASSED)
Then the context should be ready and operable (PASSED)
Then the following knative services are in a ready state in the "context-varanasi" namespace (PASSED)
And statefulset "varanasi-neo4j" in namespace "context-varanasi" is in ready state (PASSED)
When God creates a MindWM user resource with the name "shesha" and connects it to the context "varanasi" (PASSED)
Then the user resource should be ready and operable (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Create workstation01 for user shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "workstation01" and connects it to the user "shesha" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Create travellaptop for user shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "travellaptop" and connects it to the user "shesha" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Subscribed to topic '>'

Feature: MindWM two hosts one user function test
Scenario: Send ping via nats host: workstation01, user: shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And God starts reading message from NATS topic ">" (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.shesha.workstation01.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.36.23.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.shesha.workstation01.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.36.23.iodocument" (PASSED)
Then the following deployments are in a ready state in the "context-varanasi" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-shesha.workstation01-host-broker-kne-trigger._knative" (PASSED)
PASSED

Subscribed to topic '>'

Feature: MindWM two hosts one user function test
Scenario: Send ping via nats host: travellaptop, user: shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And God starts reading message from NATS topic ">" (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.shesha.travellaptop.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.36.23.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.shesha.travellaptop.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.36.23.iodocument" (PASSED)
Then the following deployments are in a ready state in the "context-varanasi" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-shesha.travellaptop-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Send iodocument via nats host: workstation01, user: shesha and check that second host received graph the update
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "id" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.shesha.workstation01.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.36.23.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.shesha.workstation01.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.3623.iodocument" (PASSED)
Then the following deployments are in a ready state in the "context-varanasi" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.graph.created" should have been received from the NATS topic "user-shesha.travellaptop-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Cleanup hosts workstation01 in user shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "workstation01" (PASSED)
Then the host "workstation01" should be deleted (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Cleanup hosts travellaptop in user shesha
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "travellaptop" (PASSED)
Then the host "travellaptop" should be deleted (PASSED)
PASSED

Feature: MindWM two hosts one user function test
Scenario: Cleanup user shesha and context varanasi
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM user resource "shesha" (PASSED)
Then the user "shesha" should be deleted (PASSED)
When God deletes the MindWM context resource "varanasi" (PASSED)
Then the context "varanasi" should be deleted (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Create context tokyo
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "tokyo" (PASSED)
Then the context should be ready and operable (PASSED)
Then the following knative services are in a ready state in the "context-tokyo" namespace (PASSED)
And statefulset "tokyo-neo4j" in namespace "context-tokyo" is in ready state (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Create godzilla and connects it to tokyo
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM user resource with the name "godzilla" and connects it to the context "tokyo" (PASSED)
Then the user resource should be ready and operable (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Create tengu and connects it to tokyo
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM user resource with the name "tengu" and connects it to the context "tokyo" (PASSED)
Then the user resource should be ready and operable (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Create laptop resource and connects it to godzilla user
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "laptop" and connects it to the user "godzilla" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Create tablet resource and connects it to tengu user
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "tablet" and connects it to the user "tengu" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Subscribed to topic '>'

Feature: MindWM two users one context function test
Scenario: Send iodocument via nats host: , user: and check that second user received graph update
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And God starts reading message from NATS topic ">" (PASSED)
And sets cloudevent header "ce-subject" to "id" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.godzilla.laptop.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.23.36.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.godzilla.laptop.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.23.36.iodocument" (PASSED)
Then the following deployments are in a ready state in the "context-tokyo" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.graph.created" should have been received from the NATS topic "user-tengu.tablet-host-broker-kne-trigger._knative" (PASSED)
PASSED

Subscribed to topic '>'

Feature: MindWM two users one context function test
Scenario: Send iodocument via nats host: , user: and check that second user received graph update
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And God starts reading message from NATS topic ">" (PASSED)
And sets cloudevent header "ce-subject" to "id" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.tengu.tablet.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.23.36.iodocument" (PASSED)
And sends cloudevent to nats topic "org.mindwm.tengu.tablet.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.8d839f82-79da-11ef-bc9f-f74fac7543ac.23.36.iodocument" (PASSED)
Then the following deployments are in a ready state in the "context-tokyo" namespace (PASSED)
And a cloudevent with type == "org.mindwm.v1.graph.created" should have been received from the NATS topic "user-godzilla.laptop-host-broker-kne-trigger._knative" (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Cleanup laptop host for godzilla username
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "laptop" (PASSED)
Then the host "laptop" should be deleted (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Cleanup tablet host for tengu username
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "tablet" (PASSED)
Then the host "tablet" should be deleted (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Cleanup godzilla username
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM user resource "godzilla" (PASSED)
Then the user "godzilla" should be deleted (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Cleanup tengu username
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM user resource "tengu" (PASSED)
Then the user "tengu" should be deleted (PASSED)
PASSED

Feature: MindWM two users one context function test
Scenario: Cleanup tokyo context
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM context resource "tokyo" (PASSED)
Then the context "tokyo" should be deleted (PASSED)
PASSED

Feature: Context Resource Readiness and Cleanup Verification
Scenario: Create Contexts and Verify All Related Resources Are in Ready State
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "aphrodite" (PASSED)
Then the context should be ready and operable (PASSED)
And namespace "context-aphrodite" should exist (PASSED)
And the following deployments are in a ready state in the "context-aphrodite" namespace (PASSED)
And statefulset "aphrodite-neo4j" in namespace "context-aphrodite" is in ready state (PASSED)
And the following knative services are in a ready state in the "context-aphrodite" namespace (PASSED)
And the following knative triggers are in a ready state in the "context-aphrodite" namespace (PASSED)
And the following knative brokers are in a ready state in the "context-aphrodite" namespace (PASSED)
And kafka topic "context-aphrodite-cdc" is in ready state in "redpanda" namespace (PASSED)
And kafka source "context-aphrodite-cdc-kafkasource" is in ready state in "context-aphrodite" namespace (PASSED)
PASSED

Feature: Context Resource Readiness and Cleanup Verification
Scenario: Create Contexts and Verify All Related Resources Are in Ready State
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "kypros" (PASSED)
Then the context should be ready and operable (PASSED)
And namespace "context-kypros" should exist (PASSED)
And the following deployments are in a ready state in the "context-kypros" namespace (PASSED)
And statefulset "kypros-neo4j" in namespace "context-kypros" is in ready state (PASSED)
And the following knative services are in a ready state in the "context-kypros" namespace (PASSED)
And the following knative triggers are in a ready state in the "context-kypros" namespace (PASSED)
And the following knative brokers are in a ready state in the "context-kypros" namespace (PASSED)
And kafka topic "context-kypros-cdc" is in ready state in "redpanda" namespace (PASSED)
And kafka source "context-kypros-cdc-kafkasource" is in ready state in "context-kypros" namespace (PASSED)
PASSED

Feature: Context Resource Readiness and Cleanup Verification
Scenario: Cleanup Contexts and Verify Resources Are Deleted
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM context resource "aphrodite" (PASSED)
Then the context "aphrodite" should be deleted (PASSED)
And namespace "context-aphrodite" should not exist (PASSED)
PASSED

Feature: Context Resource Readiness and Cleanup Verification
Scenario: Cleanup Contexts and Verify Resources Are Deleted
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM context resource "kypros" (PASSED)
Then the context "kypros" should be deleted (PASSED)
And namespace "context-kypros" should not exist (PASSED)
PASSED

================= 50 passed, 72 warnings in 2189.89s (0:36:29) =================

Copy link

github-actions bot commented Oct 4, 2024

allure report

gherkin outptut ============================= test session starts ============================== collecting ... collected 50 items

Feature: Mindwm Lifecycle Management
Scenario: Deploy Mindwm Cluster and Applications
Given an Ubuntu 24.04 system with 6 CPUs and 16 GB of RAM (PASSED)
And the mindwm-gitops repository is cloned into the "~/mindwm-gitops" directory (PASSED)
When God executes "make cluster" (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God executes "make argocd" (PASSED)
Then helm release "argocd" is deployed in "argocd" namespace (PASSED)
When God executes "make argocd_app" (PASSED)
Then the argocd "mindwm-gitops" application appears in "argocd" namespace (PASSED)
When God executes "make argocd_app_sync_async" (PASSED)
Then the argocd "mindwm-gitops" application is argocd namespace in a progressing status (PASSED)
When God executes "make argocd_app_async_wait" (PASSED)
Then all argocd applications are in a healthy state (PASSED)
When God executes "make crossplane_rolebinding_workaround" (PASSED)
Then the following roles should exist: (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Knative
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "knative-serving" should exist (PASSED)
And namespace "knative-eventing" should exist (PASSED)
And namespace "knative-operator" should exist (PASSED)
And the following deployments are in a ready state in the "knative-serving" namespace (PASSED)
And the following deployments are in a ready state in the "knative-eventing" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Istio
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "istio-system" should exist (PASSED)
And the following deployments are in a ready state in the "istio-system" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Redpanda
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "redpanda" should exist (PASSED)
And the following deployments are in a ready state in the "redpanda" namespace (PASSED)
And helm release "neo4j-cdc" is deployed in "redpanda" namespace (FAILED)
And statefulset "neo4j-cdc" in namespace "redpanda" is in ready state (FAILED)
And the following deployments are in a ready state in the "redpanda" namespace (FAILED)
FAILED

=================================== FAILURES ===================================
_ test_scenarios[file:features/0_1_mindwm_eda.feature-Mindwm event driven architecture-Redpanda] _

self = <pytest_bdd.runner.ScenarioRunner object at 0x79ca21e2e660>
item = <Function test_scenarios[file:features/0_1_mindwm_eda.feature-Mindwm event driven architecture-Redpanda]>

def pytest_runtest_call(self, item: Item):
    if "pytest_bdd_scenario" in list(map(attrgetter("name"), item.iter_markers())):
        self.request = item._request
        self.feature = self.request.getfixturevalue("feature")
        self.scenario = self.request.getfixturevalue("scenario")
        self.plugin_manager = self.request.config.hook
        self.plugin_manager.pytest_bdd_before_scenario(
            request=self.request, feature=self.feature, scenario=self.scenario
        )
        try:
          self.plugin_manager.pytest_bdd_run_scenario(
                request=self.request,
                feature=self.feature,
                scenario=self.scenario,
            )

.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:37:


.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:59: in pytest_bdd_run_scenario
return step_dispatcher(steps)
.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:69: in dispatcher
self.plugin_manager.pytest_bdd_run_step(
.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:128: in pytest_bdd_run_step
step_result = step_caller()
conftest.py:255: in helm_release_deploeyd
info = utils.helm_release_is_ready(kube, helm_release, namespace)
utils.py:52: in helm_release_is_ready
kubetest_utils.wait_for_condition(


condition = <Condition (name: helm release has status and info, met: False)>
timeout = 600, interval = 5, fail_on_api_error = True

def wait_for_condition(
    condition: Condition,
    timeout: int = None,
    interval: Union[int, float] = 1,
    fail_on_api_error: bool = True,
) -> None:
    """Wait for a condition to be met.

    Args:
        condition: The Condition to wait for.
        timeout: The maximum time to wait, in seconds, for the condition to be met.
            If unspecified, this function will wait indefinitely. If specified and
            the timeout is met or exceeded, a TimeoutError will be raised.
        interval: The time, in seconds, to wait before re-checking the condition.
        fail_on_api_error: Fail the condition checks if a Kubernetes API error is
            incurred. An API error can be raised for a number of reasons, including
            a Pod being restarted and temporarily unavailable. Disabling this will
            cause those errors to be ignored, allowing the check to continue until
            timeout or resolution. (default: True).

    Raises:
        TimeoutError: The specified timeout was exceeded.
    """
    log.info(f"waiting for condition: {condition}")

    # define the maximum time to wait. once this is met, we should
    # stop waiting.
    max_time = None
    if timeout is not None:
        max_time = time.time() + timeout

    # start the wait block
    start = time.time()
    while True:
        if max_time and time.time() >= max_time:
          raise TimeoutError(
                f"timed out ({timeout}s) while waiting for condition {condition}"
            )

E TimeoutError: timed out (600s) while waiting for condition <Condition (name: helm release has status and info, met: False)>

.venv/lib/python3.12/site-packages/kubetest/utils.py:130: TimeoutError
=========================== short test summary info ============================
FAILED features/0_1_mindwm_eda.feature::test_scenarios[file:features/0_1_mindwm_eda.feature-Mindwm event driven architecture-Redpanda] - TimeoutError: timed out (600s) while waiting for condition <Condition (name: helm release has status and info, met: False)>
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
============ 1 failed, 3 passed, 14 warnings in 1336.79s (0:22:16) =============

Copy link

github-actions bot commented Oct 4, 2024

allure report

gherkin outptut ============================= test session starts ============================== collecting ... collected 50 items

Feature: Mindwm Lifecycle Management
Scenario: Deploy Mindwm Cluster and Applications
Given an Ubuntu 24.04 system with 6 CPUs and 16 GB of RAM (PASSED)
And the mindwm-gitops repository is cloned into the "~/mindwm-gitops" directory (PASSED)
When God executes "make cluster" (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God executes "make argocd" (PASSED)
Then helm release "argocd" is deployed in "argocd" namespace (PASSED)
When God executes "make argocd_app" (PASSED)
Then the argocd "mindwm-gitops" application appears in "argocd" namespace (PASSED)
When God executes "make argocd_app_sync_async" (PASSED)
Then the argocd "mindwm-gitops" application is argocd namespace in a progressing status (PASSED)
When God executes "make argocd_app_async_wait" (PASSED)
Then all argocd applications are in a healthy state (PASSED)
When God executes "make crossplane_rolebinding_workaround" (PASSED)
Then the following roles should exist: (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Knative
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "knative-serving" should exist (PASSED)
And namespace "knative-eventing" should exist (PASSED)
And namespace "knative-operator" should exist (PASSED)
And the following deployments are in a ready state in the "knative-serving" namespace (PASSED)
And the following deployments are in a ready state in the "knative-eventing" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Istio
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "istio-system" should exist (PASSED)
And the following deployments are in a ready state in the "istio-system" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Redpanda
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "redpanda" should exist (PASSED)
And the following deployments are in a ready state in the "redpanda" namespace (PASSED)
And helm release "neo4j-cdc" is deployed in "redpanda" namespace (PASSED)
And statefulset "neo4j-cdc" in namespace "redpanda" is in ready state (PASSED)
And the following deployments are in a ready state in the "redpanda" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Cert manager
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "cert-manager" should exist (PASSED)
And the following deployments are in a ready state in the "cert-manager" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Nats
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "nats" should exist (PASSED)
And the following deployments are in a ready state in the "nats" namespace (PASSED)
And statefulset "nats" in namespace "nats" is in ready state (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Monitoring
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "monitoring" should exist (PASSED)
And the following deployments are in a ready state in the "monitoring" namespace (PASSED)
And statefulset "loki" in namespace "monitoring" is in ready state (PASSED)
And statefulset "tempo" in namespace "monitoring" is in ready state (PASSED)
And statefulset "vmalertmanager-vm-aio-victoria-metrics-k8s-stack" in namespace "monitoring" is in ready state (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create Context
Given a MindWM environment (PASSED)
When God creates a MindWM context with the name "xxx3" (PASSED)
Then the context should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create User
Given a MindWM environment (PASSED)
When God creates a MindWM user resource with the name "alice" and connects it to the context "xxx3" (PASSED)
Then the user resource should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create Host
Given a MindWM environment (PASSED)
When God creates a MindWM host resource with the name "laptop" and connects it to the user "alice" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Delete Resources and Verify Cleanup
Given a MindWM environment (PASSED)
When God deletes the MindWM host resource "laptop" (PASSED)
Then the host "laptop" should be deleted (PASSED)
When God deletes the MindWM user resource "alice" (PASSED)
Then the user "alice" should be deleted (PASSED)
When God deletes the MindWM context resource "xxx3" (PASSED)
Then the context "xxx3" should be deleted (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create Context and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "cyan" (PASSED)
Then the context should be ready and operable (PASSED)
And namespace "context-cyan" should exist (PASSED)
And helm release "cyan-neo4j" is deployed in "context-cyan" namespace (PASSED)
And statefulset "cyan-neo4j" in namespace "context-cyan" is in ready state (PASSED)
And the following knative services are in a ready state in the "context-cyan" namespace (PASSED)
And the following knative triggers are in a ready state in the "context-cyan" namespace (PASSED)
And the following knative brokers are in a ready state in the "context-cyan" namespace (PASSED)
And kafka topic "context-cyan-cdc" is in ready state in "redpanda" namespace (PASSED)
And kafka source "context-cyan-cdc-kafkasource" is in ready state in "context-cyan" namespace (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create User and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM user resource with the name "bob" and connects it to the context "cyan" (PASSED)
Then the user resource should be ready and operable (PASSED)
And namespace "user-bob" should exist (PASSED)
And the following knative brokers are in a ready state in the "user-bob" namespace (PASSED)
And the following knative triggers are in a ready state in the "context-cyan" namespace (PASSED)
And the following knative triggers are in a ready state in the "user-bob" namespace (PASSED)
PASSED

'kind': 'NatsJetStreamChannel',
'metadata': {'annotations': {'eventing.knative.dev/scope': 'cluster',
'messaging.knative.dev/creator': 'system:serviceaccount:knative-eventing:eventing-controller',
'messaging.knative.dev/lastModifier': 'system:serviceaccount:knative-eventing:eventing-controller',
'messaging.knative.dev/subscribable': 'v1'},
'creationTimestamp': '2024-10-04T15:22:59Z',
'finalizers': ['natsjetstreamchannels.messaging.knative.dev'],
'generation': 2,
'labels': {'eventing.knative.dev/broker': 'workstation-host-broker',
'eventing.knative.dev/brokerEverything': 'true'},
'managedFields': [{'apiVersion': 'messaging.knative.dev/v1alpha1',
'fieldsType': 'FieldsV1',
'fieldsV1': {'f:metadata': {'f:annotations': {'.': {},
'f:eventing.knative.dev/scope': {}},
'f:labels': {'.': {},
'f:eventing.knative.dev/broker': {},
'f:eventing.knative.dev/brokerEverything': {}},
'f:ownerReferences': {'.': {},
'k:{"uid":"5af98fbd-5131-42b5-96bd-b6d516e91454"}': {}}},
'f:spec': {'.': {},
'f:delivery': {'.': {},
'f:backoffDelay': {},
'f:backoffPolicy': {},
'f:retry': {}},
'f:stream': {'.': {},
'f:config': {'.': {},
'f:additionalSubjects': {}}}}},
'manager': 'mtchannel_broker',
'operation': 'Update',
'time': '2024-10-04T15:22:59Z'},
{'apiVersion': 'messaging.knative.dev/v1alpha1',
'fieldsType': 'FieldsV1',
'fieldsV1': {'f:metadata': {'f:finalizers': {'.': {},
'v:"natsjetstreamchannels.messaging.knative.dev"': {}}},
'f:spec': {'f:subscribers': {}}},
'manager': 'controller',
'operation': 'Update',
'time': '2024-10-04T15:23:01Z'},
{'apiVersion': 'messaging.knative.dev/v1alpha1',
'fieldsType': 'FieldsV1',
'fieldsV1': {'f:status': {'.': {},
'f:address': {'.': {},
'f:url': {}},
'f:conditions': {},
'f:observedGeneration': {}}},
'manager': 'controller',
'operation': 'Update',
'subresource': 'status',
'time': '2024-10-04T15:23:01Z'}],
'name': 'workstation-host-broker-kne-trigger',
'namespace': 'user-bob',
'ownerReferences': [{'apiVersion': 'eventing.knative.dev/v1',
'blockOwnerDeletion': True,
'controller': True,
'kind': 'Broker',
'name': 'workstation-host-broker',
'uid': '5af98fbd-5131-42b5-96bd-b6d516e91454'}],
'resourceVersion': '28002',
'uid': '2a26a98f-dc37-4ac2-8eb0-137d0f291d5f'},
'spec': {'delivery': {'backoffDelay': 'PT0.2S',
'backoffPolicy': 'exponential',
'retry': 10},
'stream': {'config': {'additionalSubjects': ['org.mindwm.bob.workstation.>'],
'duplicateWindow': '0s',
'maxAge': '0s'}},
'subscribers': [{'delivery': {'deadLetterSink': {'uri': 'http://dead-letter.user-bob.svc.cluster.local'}},
'generation': 1,
'name': 'workstation-host-broker-workstafae163e614e814dbca903a11877468e4',
'replyUri': 'http://broker-ingress.knative-eventing.svc.cluster.local/user-bob/workstation-host-broker',
'subscriberUri': 'http://broker-filter.knative-eventing.svc.cluster.local/triggers/user-bob/workstation-trigger-to-user-broker-trigger/ec95568e-fa72-42bb-841c-5f3ba1eaba3c',
'uid': '507e9731-03ff-4b54-86a0-60b2ae5a9a82'}]},
'status': {'address': {'url': 'http://workstation-host-broker-kne-trigger-kn-jsm-channel.user-bob.svc.cluster.local'},
'conditions': [{'lastTransitionTime': '2024-10-04T15:23:01Z',
'status': 'True',
'type': 'Addressable'},
{'lastTransitionTime': '2024-10-04T15:23:01Z',
'status': 'True',
'type': 'ChannelServiceReady'},
{'lastTransitionTime': '2024-10-04T15:23:01Z',
'status': 'True',
'type': 'DispatcherReady'},
{'lastTransitionTime': '2024-10-04T15:23:01Z',
'status': 'True',
'type': 'EndpointsReady'},
{'lastTransitionTime': '2024-10-04T15:23:01Z',
'status': 'Unknown',
'type': 'Ready'},
{'lastTransitionTime': '2024-10-04T15:22:59Z',
'status': 'True',
'type': 'ServiceReady'},
{'lastTransitionTime': '2024-10-04T15:22:59Z',
'status': 'Unknown',
'type': 'StreamReady'}],
'observedGeneration': 2}}

Feature: MindWM Custom kubernetes resources
Scenario: Create Host and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "workstation" and connects it to the user "bob" (PASSED)
Then the host resource should be ready and operable (PASSED)
And NatsJetStreamChannel "workstation-host-broker-kne-trigger" is ready in "user-bob" namespace (FAILED)
And the following knative triggers are in a ready state in the "user-bob" namespace (FAILED)
And the following knative brokers are in a ready state in the "user-bob" namespace (FAILED)
FAILED

=================================== FAILURES ===================================
_ test_scenarios[file:features/2_mindwm_crd_resources.feature-MindWM Custom kubernetes resources-Create Host and check k8s resources] _

self = <pytest_bdd.runner.ScenarioRunner object at 0x7df54ce0fad0>
item = <Function test_scenarios[file:features/2_mindwm_crd_resources.feature-MindWM Custom kubernetes resources-Create Host and check k8s resources]>

def pytest_runtest_call(self, item: Item):
    if "pytest_bdd_scenario" in list(map(attrgetter("name"), item.iter_markers())):
        self.request = item._request
        self.feature = self.request.getfixturevalue("feature")
        self.scenario = self.request.getfixturevalue("scenario")
        self.plugin_manager = self.request.config.hook
        self.plugin_manager.pytest_bdd_before_scenario(
            request=self.request, feature=self.feature, scenario=self.scenario
        )
        try:
          self.plugin_manager.pytest_bdd_run_scenario(
                request=self.request,
                feature=self.feature,
                scenario=self.scenario,
            )

.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:37:


.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:59: in pytest_bdd_run_scenario
return step_dispatcher(steps)
.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:69: in dispatcher
self.plugin_manager.pytest_bdd_run_step(
.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:128: in pytest_bdd_run_step
step_result = step_caller()


kube = <kubetest.client.TestClient object at 0x7df54aeb98b0>
nats_stream_name = 'workstation-host-broker-kne-trigger', namespace = 'user-bob'

@then("NatsJetStreamChannel \"{nats_stream_name}\" is ready in \"{namespace}\" namespace")
def nats_stream_exist(kube, nats_stream_name, namespace):
    nats_stream = utils.nats_stream_wait_for_ready(kube, nats_stream_name, namespace)
    is_ready = utils.resource_get_condition(nats_stream['status'], 'Ready')
    with allure.step(f"Nats stream '{nats_stream}' ready state is {is_ready}"):
        pass
  assert(is_ready == 'True')

E AssertionError: assert 'Unknown' == 'True'
E
E - True
E + Unknown

conftest.py:387: AssertionError
=========================== short test summary info ============================
FAILED features/2_mindwm_crd_resources.feature::test_scenarios[file:features/2_mindwm_crd_resources.feature-MindWM Custom kubernetes resources-Create Host and check k8s resources] - AssertionError: assert 'Unknown' == 'True'

  • True
  • Unknown
    !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
    ============ 1 failed, 13 passed, 25 warnings in 1293.29s (0:21:33) ============

@metacoma metacoma merged commit e6fb57c into master Oct 7, 2024
1 check failed
Copy link

github-actions bot commented Oct 7, 2024

allure report

gherkin outptut ============================= test session starts ============================== collecting ... collected 50 items

Feature: Mindwm Lifecycle Management
Scenario: Deploy Mindwm Cluster and Applications
Given an Ubuntu 24.04 system with 6 CPUs and 16 GB of RAM (PASSED)
And the mindwm-gitops repository is cloned into the "~/mindwm-gitops" directory (PASSED)
When God executes "make cluster" (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God executes "make argocd" (PASSED)
Then helm release "argocd" is deployed in "argocd" namespace (PASSED)
When God executes "make argocd_app" (PASSED)
Then the argocd "mindwm-gitops" application appears in "argocd" namespace (PASSED)
When God executes "make argocd_app_sync_async" (PASSED)
Then the argocd "mindwm-gitops" application is argocd namespace in a progressing status (PASSED)
When God executes "make argocd_app_async_wait" (PASSED)
Then all argocd applications are in a healthy state (PASSED)
When God executes "make crossplane_rolebinding_workaround" (PASSED)
Then the following roles should exist: (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Knative
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "knative-serving" should exist (PASSED)
And namespace "knative-eventing" should exist (PASSED)
And namespace "knative-operator" should exist (PASSED)
And the following deployments are in a ready state in the "knative-serving" namespace (PASSED)
And the following deployments are in a ready state in the "knative-eventing" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Istio
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "istio-system" should exist (PASSED)
And the following deployments are in a ready state in the "istio-system" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Redpanda
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "redpanda" should exist (PASSED)
And the following deployments are in a ready state in the "redpanda" namespace (PASSED)
And helm release "neo4j-cdc" is deployed in "redpanda" namespace (PASSED)
And statefulset "neo4j-cdc" in namespace "redpanda" is in ready state (PASSED)
And the following deployments are in a ready state in the "redpanda" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Cert manager
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "cert-manager" should exist (PASSED)
And the following deployments are in a ready state in the "cert-manager" namespace (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Nats
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "nats" should exist (PASSED)
And the following deployments are in a ready state in the "nats" namespace (PASSED)
And statefulset "nats" in namespace "nats" is in ready state (PASSED)
PASSED

Feature: Mindwm event driven architecture
Scenario: Monitoring
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
And namespace "monitoring" should exist (PASSED)
And the following deployments are in a ready state in the "monitoring" namespace (PASSED)
And statefulset "loki" in namespace "monitoring" is in ready state (PASSED)
And statefulset "tempo" in namespace "monitoring" is in ready state (PASSED)
And statefulset "vmalertmanager-vm-aio-victoria-metrics-k8s-stack" in namespace "monitoring" is in ready state (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create Context
Given a MindWM environment (PASSED)
When God creates a MindWM context with the name "xxx3" (PASSED)
Then the context should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create User
Given a MindWM environment (PASSED)
When God creates a MindWM user resource with the name "alice" and connects it to the context "xxx3" (PASSED)
Then the user resource should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Create Host
Given a MindWM environment (PASSED)
When God creates a MindWM host resource with the name "laptop" and connects it to the user "alice" (PASSED)
Then the host resource should be ready and operable (PASSED)
PASSED

Feature: MindWM Custom Resource Definition
Scenario: Delete Resources and Verify Cleanup
Given a MindWM environment (PASSED)
When God deletes the MindWM host resource "laptop" (PASSED)
Then the host "laptop" should be deleted (PASSED)
When God deletes the MindWM user resource "alice" (PASSED)
Then the user "alice" should be deleted (PASSED)
When God deletes the MindWM context resource "xxx3" (PASSED)
Then the context "xxx3" should be deleted (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create Context and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "cyan" (PASSED)
Then the context should be ready and operable (PASSED)
And namespace "context-cyan" should exist (PASSED)
And helm release "cyan-neo4j" is deployed in "context-cyan" namespace (PASSED)
And statefulset "cyan-neo4j" in namespace "context-cyan" is in ready state (PASSED)
And the following knative services are in a ready state in the "context-cyan" namespace (PASSED)
And the following knative triggers are in a ready state in the "context-cyan" namespace (PASSED)
And the following knative brokers are in a ready state in the "context-cyan" namespace (PASSED)
And kafka topic "context-cyan-cdc" is in ready state in "redpanda" namespace (PASSED)
And kafka source "context-cyan-cdc-kafkasource" is in ready state in "context-cyan" namespace (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Create User and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM user resource with the name "bob" and connects it to the context "cyan" (PASSED)
Then the user resource should be ready and operable (PASSED)
And namespace "user-bob" should exist (PASSED)
And the following knative brokers are in a ready state in the "user-bob" namespace (PASSED)
And the following knative triggers are in a ready state in the "context-cyan" namespace (PASSED)
And the following knative triggers are in a ready state in the "user-bob" namespace (PASSED)
PASSED

'kind': 'NatsJetStreamChannel',
'metadata': {'annotations': {'eventing.knative.dev/scope': 'cluster',
'messaging.knative.dev/creator': 'system:serviceaccount:knative-eventing:eventing-controller',
'messaging.knative.dev/lastModifier': 'system:serviceaccount:knative-eventing:eventing-controller',
'messaging.knative.dev/subscribable': 'v1'},
'creationTimestamp': '2024-10-07T17:43:04Z',
'finalizers': ['natsjetstreamchannels.messaging.knative.dev'],
'generation': 2,
'labels': {'eventing.knative.dev/broker': 'workstation-host-broker',
'eventing.knative.dev/brokerEverything': 'true'},
'managedFields': [{'apiVersion': 'messaging.knative.dev/v1alpha1',
'fieldsType': 'FieldsV1',
'fieldsV1': {'f:metadata': {'f:annotations': {'.': {},
'f:eventing.knative.dev/scope': {}},
'f:labels': {'.': {},
'f:eventing.knative.dev/broker': {},
'f:eventing.knative.dev/brokerEverything': {}},
'f:ownerReferences': {'.': {},
'k:{"uid":"d6564c9a-8ba0-49f8-bc70-4c078c0cad18"}': {}}},
'f:spec': {'.': {},
'f:delivery': {'.': {},
'f:backoffDelay': {},
'f:backoffPolicy': {},
'f:retry': {}},
'f:stream': {'.': {},
'f:config': {'.': {},
'f:additionalSubjects': {}}}}},
'manager': 'mtchannel_broker',
'operation': 'Update',
'time': '2024-10-07T17:43:04Z'},
{'apiVersion': 'messaging.knative.dev/v1alpha1',
'fieldsType': 'FieldsV1',
'fieldsV1': {'f:metadata': {'f:finalizers': {'.': {},
'v:"natsjetstreamchannels.messaging.knative.dev"': {}}},
'f:spec': {'f:subscribers': {}}},
'manager': 'controller',
'operation': 'Update',
'time': '2024-10-07T17:43:07Z'},
{'apiVersion': 'messaging.knative.dev/v1alpha1',
'fieldsType': 'FieldsV1',
'fieldsV1': {'f:status': {'.': {},
'f:address': {'.': {},
'f:url': {}},
'f:conditions': {},
'f:observedGeneration': {}}},
'manager': 'controller',
'operation': 'Update',
'subresource': 'status',
'time': '2024-10-07T17:43:07Z'},
{'apiVersion': 'messaging.knative.dev/v1alpha1',
'fieldsType': 'FieldsV1',
'fieldsV1': {'f:status': {'f:subscribers': {}}},
'manager': 'dispatcher',
'operation': 'Update',
'subresource': 'status',
'time': '2024-10-07T17:43:07Z'}],
'name': 'workstation-host-broker-kne-trigger',
'namespace': 'user-bob',
'ownerReferences': [{'apiVersion': 'eventing.knative.dev/v1',
'blockOwnerDeletion': True,
'controller': True,
'kind': 'Broker',
'name': 'workstation-host-broker',
'uid': 'd6564c9a-8ba0-49f8-bc70-4c078c0cad18'}],
'resourceVersion': '20759',
'uid': '6ba8d835-0241-40f2-900c-c8b38664d09d'},
'spec': {'delivery': {'backoffDelay': 'PT0.2S',
'backoffPolicy': 'exponential',
'retry': 10},
'stream': {'config': {'additionalSubjects': ['org.mindwm.bob.workstation.>'],
'duplicateWindow': '0s',
'maxAge': '0s'}},
'subscribers': [{'delivery': {'deadLetterSink': {'uri': 'http://dead-letter.user-bob.svc.cluster.local'}},
'generation': 1,
'name': 'workstation-host-broker-worksta02ea3ddf5e005e68ba1ba3fc4c2751a5',
'replyUri': 'http://broker-ingress.knative-eventing.svc.cluster.local/user-bob/workstation-host-broker',
'subscriberUri': 'http://broker-filter.knative-eventing.svc.cluster.local/triggers/user-bob/workstation-trigger-to-user-broker-trigger/3675c0c9-fe0f-44b1-8a0b-370481ddf78f',
'uid': 'c47759f4-071e-4a33-9c69-24af07e73ec5'}]},
'status': {'address': {'url': 'http://workstation-host-broker-kne-trigger-kn-jsm-channel.user-bob.svc.cluster.local'},
'conditions': [{'lastTransitionTime': '2024-10-07T17:43:07Z',
'status': 'True',
'type': 'Addressable'},
{'lastTransitionTime': '2024-10-07T17:43:07Z',
'status': 'True',
'type': 'ChannelServiceReady'},
{'lastTransitionTime': '2024-10-07T17:43:07Z',
'status': 'True',
'type': 'DispatcherReady'},
{'lastTransitionTime': '2024-10-07T17:43:07Z',
'status': 'True',
'type': 'EndpointsReady'},
{'lastTransitionTime': '2024-10-07T17:43:07Z',
'status': 'True',
'type': 'Ready'},
{'lastTransitionTime': '2024-10-07T17:43:05Z',
'status': 'True',
'type': 'ServiceReady'},
{'lastTransitionTime': '2024-10-07T17:43:07Z',
'status': 'True',
'type': 'StreamReady'}],
'observedGeneration': 2,
'subscribers': [{'observedGeneration': 1,
'ready': 'True',
'uid': 'c47759f4-071e-4a33-9c69-24af07e73ec5'}]}}

Feature: MindWM Custom kubernetes resources
Scenario: Create Host and check k8s resources
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM host resource with the name "workstation" and connects it to the user "bob" (PASSED)
Then the host resource should be ready and operable (PASSED)
And NatsJetStreamChannel "workstation-host-broker-kne-trigger" is ready in "user-bob" namespace (PASSED)
And the following knative triggers are in a ready state in the "user-bob" namespace (PASSED)
And the following knative brokers are in a ready state in the "user-bob" namespace (PASSED)
PASSED

Feature: MindWM Custom kubernetes resources
Scenario: Delete Resources and Verify Cleanup
Given a MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God deletes the MindWM host resource "workstation" (PASSED)
Then the host "workstation" should be deleted (PASSED)
When God deletes the MindWM user resource "bob" (PASSED)
Then the user "bob" should be deleted (PASSED)
And namespace "user-bob" should not exist (PASSED)
When God deletes the MindWM context resource "cyan" (PASSED)
Then the context "cyan" should be deleted (PASSED)
And namespace "context-cyan" should not exist (PASSED)
PASSED

'kind': 'NatsJetStreamChannel',
'metadata': {'annotations': {'eventing.knative.dev/scope': 'cluster',
'messaging.knative.dev/creator': 'system:serviceaccount:knative-eventing:eventing-controller',
'messaging.knative.dev/lastModifier': 'system:serviceaccount:knative-eventing:eventing-controller',
'messaging.knative.dev/subscribable': 'v1'},
'creationTimestamp': '2024-10-07T17:46:26Z',
'finalizers': ['natsjetstreamchannels.messaging.knative.dev'],
'generation': 2,
'labels': {'eventing.knative.dev/broker': 'pi6-host-host-broker',
'eventing.knative.dev/brokerEverything': 'true'},
'managedFields': [{'apiVersion': 'messaging.knative.dev/v1alpha1',
'fieldsType': 'FieldsV1',
'fieldsV1': {'f:metadata': {'f:annotations': {'.': {},
'f:eventing.knative.dev/scope': {}},
'f:labels': {'.': {},
'f:eventing.knative.dev/broker': {},
'f:eventing.knative.dev/brokerEverything': {}},
'f:ownerReferences': {'.': {},
'k:{"uid":"458cba7a-ebca-466f-a76e-44a4c493b7ba"}': {}}},
'f:spec': {'.': {},
'f:delivery': {'.': {},
'f:backoffDelay': {},
'f:backoffPolicy': {},
'f:retry': {}},
'f:stream': {'.': {},
'f:config': {'.': {},
'f:additionalSubjects': {}}}}},
'manager': 'mtchannel_broker',
'operation': 'Update',
'time': '2024-10-07T17:46:26Z'},
{'apiVersion': 'messaging.knative.dev/v1alpha1',
'fieldsType': 'FieldsV1',
'fieldsV1': {'f:metadata': {'f:finalizers': {'.': {},
'v:"natsjetstreamchannels.messaging.knative.dev"': {}}},
'f:spec': {'f:subscribers': {}}},
'manager': 'controller',
'operation': 'Update',
'time': '2024-10-07T17:46:33Z'},
{'apiVersion': 'messaging.knative.dev/v1alpha1',
'fieldsType': 'FieldsV1',
'fieldsV1': {'f:status': {'.': {},
'f:address': {'.': {},
'f:url': {}},
'f:conditions': {},
'f:observedGeneration': {}}},
'manager': 'controller',
'operation': 'Update',
'subresource': 'status',
'time': '2024-10-07T17:46:33Z'},
{'apiVersion': 'messaging.knative.dev/v1alpha1',
'fieldsType': 'FieldsV1',
'fieldsV1': {'f:status': {'f:subscribers': {}}},
'manager': 'dispatcher',
'operation': 'Update',
'subresource': 'status',
'time': '2024-10-07T17:46:34Z'}],
'name': 'pi6-host-host-broker-kne-trigger',
'namespace': 'user-amanda4',
'ownerReferences': [{'apiVersion': 'eventing.knative.dev/v1',
'blockOwnerDeletion': True,
'controller': True,
'kind': 'Broker',
'name': 'pi6-host-host-broker',
'uid': '458cba7a-ebca-466f-a76e-44a4c493b7ba'}],
'resourceVersion': '27118',
'uid': '724489d7-d96e-4b10-a8de-b555ce6a9a07'},
'spec': {'delivery': {'backoffDelay': 'PT0.2S',
'backoffPolicy': 'exponential',
'retry': 10},
'stream': {'config': {'additionalSubjects': ['org.mindwm.amanda4.pi6-host.>'],
'duplicateWindow': '0s',
'maxAge': '0s'}},
'subscribers': [{'delivery': {'deadLetterSink': {'uri': 'http://dead-letter.user-amanda4.svc.cluster.local'}},
'generation': 1,
'name': 'pi6-host-host-broker-pi6-host-tdb78bba3de52558037ea8923d905111d',
'replyUri': 'http://broker-ingress.knative-eventing.svc.cluster.local/user-amanda4/pi6-host-host-broker',
'subscriberUri': 'http://broker-filter.knative-eventing.svc.cluster.local/triggers/user-amanda4/pi6-host-trigger-to-user-broker-trigger/44b1d916-0ca1-4a47-aa30-0da057c006bc',
'uid': '021d2fe0-db94-42ba-8be3-abec731fdc2f'}]},
'status': {'address': {'url': 'http://pi6-host-host-broker-kne-trigger-kn-jsm-channel.user-amanda4.svc.cluster.local'},
'conditions': [{'lastTransitionTime': '2024-10-07T17:46:33Z',
'status': 'True',
'type': 'Addressable'},
{'lastTransitionTime': '2024-10-07T17:46:33Z',
'status': 'True',
'type': 'ChannelServiceReady'},
{'lastTransitionTime': '2024-10-07T17:46:33Z',
'status': 'True',
'type': 'DispatcherReady'},
{'lastTransitionTime': '2024-10-07T17:46:33Z',
'status': 'True',
'type': 'EndpointsReady'},
{'lastTransitionTime': '2024-10-07T17:46:33Z',
'status': 'True',
'type': 'Ready'},
{'lastTransitionTime': '2024-10-07T17:46:27Z',
'status': 'True',
'type': 'ServiceReady'},
{'lastTransitionTime': '2024-10-07T17:46:31Z',
'status': 'True',
'type': 'StreamReady'}],
'observedGeneration': 2,
'subscribers': [{'observedGeneration': 1,
'ready': 'True',
'uid': '021d2fe0-db94-42ba-8be3-abec731fdc2f'}]}}

Feature: MindWM Ping-pong EDA test
Scenario: Prepare environment for ping tests
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a MindWM context with the name "green4" (PASSED)
Then the context should be ready and operable (PASSED)
And the following knative services are in a ready state in the "context-green4" namespace (PASSED)
When God creates a MindWM user resource with the name "amanda4" and connects it to the context "green4" (PASSED)
Then the user resource should be ready and operable (PASSED)
When God creates a MindWM host resource with the name "pi6-host" and connects it to the user "amanda4" (PASSED)
Then the host resource should be ready and operable (PASSED)
And NatsJetStreamChannel "pi6-host-host-broker-kne-trigger" is ready in "user-amanda4" namespace (PASSED)
When God starts reading message from NATS topic ">" (PASSED)
PASSED
Connected to NATS server at nats://root:[email protected]:4222
Subscribed to topic '>'

Feature: MindWM Ping-pong EDA test
Scenario: Send pind to knative ping service
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sends cloudevent to knative service "pong" in "context-green4" namespace (PASSED)
Then the response http code should be "200" (PASSED)
Then the following deployments are in a ready state in the "context-green4" namespace (PASSED)
PASSED

Feature: MindWM Ping-pong EDA test
Scenario: Send ping via broker-ingress.knative-eventing/context-green4/context-broker
Given A MindWM environment (PASSED)
Then all nodes in Kubernetes are ready (PASSED)
When God creates a new cloudevent (PASSED)
And sets cloudevent header "ce-subject" to "#ping" (PASSED)
And sets cloudevent header "ce-type" to "org.mindwm.v1.iodocument" (PASSED)
And sets cloudevent header "traceparent" to "00-5df92f3577b34da6a3ce929d0e0e4734-00f067aa0ba902b7-00" (PASSED)
And sets cloudevent header "ce-source" to "org.mindwm.amanda4.pi6-host.L3RtcC90bXV4LTEwMDAvZGVmYXVsdA==.09fb195c-c419-6d62-15e0-51b6ee990922.23.36.iodocument" (PASSED)
And sends cloudevent to "broker-ingress.knative-eventing/context-green4/context-broker" (PASSED)
Then the response http code should be "202" (PASSED)
Then the following deployments are in a ready state in the "context-green4" namespace (PASSED)
Then the trace with "00-5df92f3577b34da6a3ce929d0e0e4734-00f067aa0ba902b7-00" should appear in TraceQL (PASSED)
And the trace should contains (FAILED)
And a cloudevent with type == "org.mindwm.v1.pong" should have been received from the NATS topic "user-amanda4.pi6-host-host-broker-kne-trigger._knative" (FAILED)
FAILED

=================================== FAILURES ===================================
_ test_scenarios[file:features/3_mindwm_ping_pong.feature-MindWM Ping-pong EDA test-Send ping via broker-ingress.knative-eventing/context-green4/context-broker[table_rows:[line: 82]]] _

self = <pytest_bdd.runner.ScenarioRunner object at 0x730a6ddbb230>
item = <Function test_scenarios[file:features/3_mindwm_ping_pong.feature-MindWM Ping-pong EDA test-Send ping via broker-ingress.knative-eventing/context-green4/context-broker[table_rows:[line: 82]]]>

def pytest_runtest_call(self, item: Item):
    if "pytest_bdd_scenario" in list(map(attrgetter("name"), item.iter_markers())):
        self.request = item._request
        self.feature = self.request.getfixturevalue("feature")
        self.scenario = self.request.getfixturevalue("scenario")
        self.plugin_manager = self.request.config.hook
        self.plugin_manager.pytest_bdd_before_scenario(
            request=self.request, feature=self.feature, scenario=self.scenario
        )
        try:
          self.plugin_manager.pytest_bdd_run_scenario(
                request=self.request,
                feature=self.feature,
                scenario=self.scenario,
            )

.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:37:


.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:59: in pytest_bdd_run_scenario
return step_dispatcher(steps)
.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:69: in dispatcher
self.plugin_manager.pytest_bdd_run_step(
.venv/lib/python3.12/site-packages/pytest_bdd/runner.py:128: in pytest_bdd_run_step
step_result = step_caller()


step = PickleStep(argument=PickleStepArgument(doc_string=None, data_table=PickleTable(rows=[PickleTableRow(cells=[PickleTable...atcher')])])), ast_node_ids=['352', '355'], id='415', type=<Type.outcome: 'Outcome'>, text='the trace should contains')
trace_data = {'data': resource_spans {
resource {
attributes {
key: "service.name"
value {
string_value: ...host.ip"
value {
string_value: "10.43.128.104"
}
}
status {
}
}
}
}
}

@then("the trace should contains")
def trace_should_contains(step, trace_data):
    #pprint.pprint(f"TRACE DATA = {trace_data['data']}")
    title_row, *rows = step.data_table.rows
    for row in rows:
        service_name = row.cells[0].value
        #http_code = row.cells[1].value
        #http_path = row.cells[2].value
        #pprint.pprint(f"{service_name} {http_code} {http_path}")
        scope_span = utils.span_by_service_name(trace_data['data'], service_name)
      assert(scope_span is not None), f"Scope span {service_name} not found in trace data"

E AssertionError: Scope span unknown_service not found in trace data
E assert None is not None

conftest.py:435: AssertionError
=========================== short test summary info ============================
FAILED features/3_mindwm_ping_pong.feature::test_scenarios[file:features/3_mindwm_ping_pong.feature-MindWM Ping-pong EDA test-Send ping via broker-ingress.knative-eventing/context-green4/context-broker[table_rows:[line: 82]]] - AssertionError: Scope span unknown_service not found in trace data
assert None is not None
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
============ 1 failed, 17 passed, 32 warnings in 1172.36s (0:19:32) ============

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant