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/test ping pong full flow #123

Merged
merged 8 commits into from
Sep 23, 2024
Merged

Conversation

metacoma
Copy link
Contributor

No description provided.

Copy link

allure report

gherkin outptu ============================= test session starts ============================== collecting ... collected 24 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 "user-amanda4.pi6-host-host-broker-kne-trigger._knative" (PASSED)
PASSED
Connected to NATS server at nats://root:[email protected]:4222
Subscribed to topic 'user-amanda4.pi6-host-host-broker-kne-trigger._knative'

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 (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 (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-d6fbc996152865ed-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-d6fbc996152865ed-01', 'type': 'org.mindwm.v1.graph.node.iodocument', 'uuid': 'b31c11e4290f41199d3d93515589bed7', '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 'user-garmr.helheim-host-broker-kne-trigger._knative'
Received a message on 'user-garmr.helheim-host-broker-kne-trigger._knative': {"type":"org.mindwm.v1.graph.created","obj":{"traceparent":"00-7df92f3577b34da6a3ce930d0e0e4734-96815d9e32cd6279-01","tracestate":null,"username":"","type":"org.mindwm.v1.graph.node.user","created":null,"merged":null,"atime":0}}
Received a message on 'user-garmr.helheim-host-broker-kne-trigger._knative': {"type":"org.mindwm.v1.graph.updated","obj":{"traceparent":"00-7df92f3577b34da6a3ce930d0e0e4734-96815d9e32cd6279-01","tracestate":null,"username":"xxx","type":"org.mindwm.v1.graph.node.user","created":null,"merged":null,"atime":0}}
Received a message on 'user-garmr.helheim-host-broker-kne-trigger._knative': {"type":"org.mindwm.v1.graph.deleted","obj":{"traceparent":"00-7df92f3577b34da6a3ce930d0e0e4734-96815d9e32cd6279-01","tracestate":null,"username":"xxx","type":"org.mindwm.v1.graph.node.user","created":null,"merged":null,"atime":0}}

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 "user-garmr.helheim-host-broker-kne-trigger._knative" (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 (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 (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 (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

================= 24 passed, 40 warnings in 1614.85s (0:26:54) =================

@metacoma metacoma merged commit c87ce4c into master Sep 23, 2024
1 check passed
@metacoma metacoma mentioned this pull request Oct 3, 2024
40 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant