chore: Update versions for SDP 26.7.0#944
Open
Techassi wants to merge 2 commits into
Open
Conversation
12 tasks
sbernauer
reviewed
Jun 9, 2026
Member
There was a problem hiding this comment.
There are multiple problems with you test changes (just try running them ;)). I think they should look like something like this (diff against main):
(hapy to commit them if you want)
In any case: Pls run the kuttl tests before merging
diff --git a/tests/templates/kuttl/cluster-sync-cs-bug/20-install-nifi.yaml.j2 b/tests/templates/kuttl/cluster-sync-cs-bug/20-install-nifi.yaml.j2
index f47dc62..61f43bc 100644
--- a/tests/templates/kuttl/cluster-sync-cs-bug/20-install-nifi.yaml.j2
+++ b/tests/templates/kuttl/cluster-sync-cs-bug/20-install-nifi.yaml.j2
@@ -166,12 +166,12 @@ metadata:
name: nifi
spec:
image:
-{% if test_scenario['values']['nifi-v2'].find(",") > 0 %}
- custom: "{{ test_scenario['values']['nifi-v2'].split(',')[1] }}"
- productVersion: "{{ test_scenario['values']['nifi-v2'].split(',')[0] }}"
+{% if test_scenario['values']['nifi'].find(",") > 0 %}
+ custom: "{{ test_scenario['values']['nifi'].split(',')[1] }}"
+ productVersion: "{{ test_scenario['values']['nifi'].split(',')[0] }}"
{% else %}
custom: null
- productVersion: "{{ test_scenario['values']['nifi-v2'] }}"
+ productVersion: "{{ test_scenario['values']['nifi'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
diff --git a/tests/templates/kuttl/smoke_v1/00-patch-ns.yaml.j2 b/tests/templates/kuttl/smoke/00-patch-ns.yaml.j2
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/00-patch-ns.yaml.j2
rename to tests/templates/kuttl/smoke/00-patch-ns.yaml.j2
diff --git a/tests/templates/kuttl/smoke_v1/00-range-limit.yaml b/tests/templates/kuttl/smoke/00-range-limit.yaml
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/00-range-limit.yaml
rename to tests/templates/kuttl/smoke/00-range-limit.yaml
diff --git a/tests/templates/kuttl/smoke_v1/10-assert.yaml.j2 b/tests/templates/kuttl/smoke/10-assert.yaml.j2
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/10-assert.yaml.j2
rename to tests/templates/kuttl/smoke/10-assert.yaml.j2
diff --git a/tests/templates/kuttl/smoke_v1/10-install-vector-aggregator-discovery-configmap.yaml.j2 b/tests/templates/kuttl/smoke/10-install-vector-aggregator-discovery-configmap.yaml.j2
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/10-install-vector-aggregator-discovery-configmap.yaml.j2
rename to tests/templates/kuttl/smoke/10-install-vector-aggregator-discovery-configmap.yaml.j2
diff --git a/tests/templates/kuttl/smoke_v2/20-assert.yaml.j2 b/tests/templates/kuttl/smoke/20-assert.yaml.j2
similarity index 100%
rename from tests/templates/kuttl/smoke_v2/20-assert.yaml.j2
rename to tests/templates/kuttl/smoke/20-assert.yaml.j2
diff --git a/tests/templates/kuttl/smoke_v2/20-install-zookeeper.yaml.j2 b/tests/templates/kuttl/smoke/20-install-zookeeper.yaml.j2
similarity index 100%
rename from tests/templates/kuttl/smoke_v2/20-install-zookeeper.yaml.j2
rename to tests/templates/kuttl/smoke/20-install-zookeeper.yaml.j2
diff --git a/tests/templates/kuttl/smoke_v1/30-assert.yaml b/tests/templates/kuttl/smoke/30-assert.yaml
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/30-assert.yaml
rename to tests/templates/kuttl/smoke/30-assert.yaml
diff --git a/tests/templates/kuttl/smoke_v2/30-install-nifi.yaml.j2 b/tests/templates/kuttl/smoke/30-install-nifi.yaml.j2
similarity index 90%
rename from tests/templates/kuttl/smoke_v2/30-install-nifi.yaml.j2
rename to tests/templates/kuttl/smoke/30-install-nifi.yaml.j2
index ec39df1..b55c8c6 100644
--- a/tests/templates/kuttl/smoke_v2/30-install-nifi.yaml.j2
+++ b/tests/templates/kuttl/smoke/30-install-nifi.yaml.j2
@@ -42,12 +42,12 @@ metadata:
name: nifi
spec:
image:
-{% if test_scenario['values']['nifi-v2'].find(",") > 0 %}
- custom: "{{ test_scenario['values']['nifi-v2'].split(',')[1] }}"
- productVersion: "{{ test_scenario['values']['nifi-v2'].split(',')[0] }}"
+{% if test_scenario['values']['nifi'].find(",") > 0 %}
+ custom: "{{ test_scenario['values']['nifi'].split(',')[1] }}"
+ productVersion: "{{ test_scenario['values']['nifi'].split(',')[0] }}"
{% else %}
custom: null
- productVersion: "{{ test_scenario['values']['nifi-v2'] }}"
+ productVersion: "{{ test_scenario['values']['nifi'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
diff --git a/tests/templates/kuttl/smoke_v1/31-assert.yaml.j2 b/tests/templates/kuttl/smoke/31-assert.yaml.j2
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/31-assert.yaml.j2
rename to tests/templates/kuttl/smoke/31-assert.yaml.j2
diff --git a/tests/templates/kuttl/smoke_v1/32-assert.yaml b/tests/templates/kuttl/smoke/32-assert.yaml
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/32-assert.yaml
rename to tests/templates/kuttl/smoke/32-assert.yaml
diff --git a/tests/templates/kuttl/smoke_v1/33-assert.yaml b/tests/templates/kuttl/smoke/33-assert.yaml
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/33-assert.yaml
rename to tests/templates/kuttl/smoke/33-assert.yaml
diff --git a/tests/templates/kuttl/smoke_v2/34-assert.yaml.j2 b/tests/templates/kuttl/smoke/34-assert.yaml.j2
similarity index 100%
rename from tests/templates/kuttl/smoke_v2/34-assert.yaml.j2
rename to tests/templates/kuttl/smoke/34-assert.yaml.j2
diff --git a/tests/templates/kuttl/smoke_v2/35-assert.yaml.j2 b/tests/templates/kuttl/smoke/35-assert.yaml.j2
similarity index 100%
rename from tests/templates/kuttl/smoke_v2/35-assert.yaml.j2
rename to tests/templates/kuttl/smoke/35-assert.yaml.j2
diff --git a/tests/templates/kuttl/smoke_v1/40-assert.yaml b/tests/templates/kuttl/smoke/40-assert.yaml
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/40-assert.yaml
rename to tests/templates/kuttl/smoke/40-assert.yaml
diff --git a/tests/templates/kuttl/smoke_v1/40-scale-up-nifi.yaml.j2 b/tests/templates/kuttl/smoke/40-scale-up-nifi.yaml.j2
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/40-scale-up-nifi.yaml.j2
rename to tests/templates/kuttl/smoke/40-scale-up-nifi.yaml.j2
diff --git a/tests/templates/kuttl/smoke_v1/50-assert.yaml b/tests/templates/kuttl/smoke/50-assert.yaml
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/50-assert.yaml
rename to tests/templates/kuttl/smoke/50-assert.yaml
diff --git a/tests/templates/kuttl/smoke_v2/50-install-test-nifi.yaml.j2 b/tests/templates/kuttl/smoke/50-install-test-nifi.yaml.j2
similarity index 100%
rename from tests/templates/kuttl/smoke_v2/50-install-test-nifi.yaml.j2
rename to tests/templates/kuttl/smoke/50-install-test-nifi.yaml.j2
diff --git a/tests/templates/kuttl/smoke_v1/60-assert.yaml.j2 b/tests/templates/kuttl/smoke/60-assert.yaml.j2
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/60-assert.yaml.j2
rename to tests/templates/kuttl/smoke/60-assert.yaml.j2
diff --git a/tests/templates/kuttl/smoke_v1/60-prepare-test-nifi.yaml b/tests/templates/kuttl/smoke/60-prepare-test-nifi.yaml
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/60-prepare-test-nifi.yaml
rename to tests/templates/kuttl/smoke/60-prepare-test-nifi.yaml
diff --git a/tests/templates/kuttl/smoke_v1/cacert.pem b/tests/templates/kuttl/smoke/cacert.pem
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/cacert.pem
rename to tests/templates/kuttl/smoke/cacert.pem
diff --git a/tests/templates/kuttl/smoke_v1/test_nifi.py b/tests/templates/kuttl/smoke/test_nifi.py
similarity index 100%
rename from tests/templates/kuttl/smoke_v1/test_nifi.py
rename to tests/templates/kuttl/smoke/test_nifi.py
diff --git a/tests/templates/kuttl/smoke_v2/test_nifi_metrics.py b/tests/templates/kuttl/smoke/test_nifi_metrics.py
similarity index 100%
rename from tests/templates/kuttl/smoke_v2/test_nifi_metrics.py
rename to tests/templates/kuttl/smoke/test_nifi_metrics.py
diff --git a/tests/templates/kuttl/smoke_v1/20-assert.yaml b/tests/templates/kuttl/smoke_v1/20-assert.yaml
deleted file mode 100644
index 49ba743..0000000
--- a/tests/templates/kuttl/smoke_v1/20-assert.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-apiVersion: kuttl.dev/v1beta1
-kind: TestAssert
-timeout: 600
----
-apiVersion: apps/v1
-kind: StatefulSet
-metadata:
- name: zookeeper-server-default
-status:
- readyReplicas: 1
- replicas: 1
diff --git a/tests/templates/kuttl/smoke_v1/20-install-zookeeper.yaml.j2 b/tests/templates/kuttl/smoke_v1/20-install-zookeeper.yaml.j2
deleted file mode 100644
index 2080faf..0000000
--- a/tests/templates/kuttl/smoke_v1/20-install-zookeeper.yaml.j2
+++ /dev/null
@@ -1,22 +0,0 @@
----
-apiVersion: zookeeper.stackable.tech/v1alpha1
-kind: ZookeeperCluster
-metadata:
- name: zookeeper
-spec:
- image:
- productVersion: "{{ test_scenario['values']['zookeeper'] }}"
- pullPolicy: IfNotPresent
- clusterConfig:
-{% if lookup('env', 'VECTOR_AGGREGATOR') %}
- vectorAggregatorConfigMapName: vector-aggregator-discovery
-{% endif %}
- servers:
- config:
- logging:
- enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
- roleConfig:
- listenerClass: {{ test_scenario['values']['listener-class'] }}
- roleGroups:
- default:
- replicas: 1
diff --git a/tests/templates/kuttl/smoke_v1/30-install-nifi.yaml.j2 b/tests/templates/kuttl/smoke_v1/30-install-nifi.yaml.j2
deleted file mode 100644
index ee1798a..0000000
--- a/tests/templates/kuttl/smoke_v1/30-install-nifi.yaml.j2
+++ /dev/null
@@ -1,88 +0,0 @@
----
-apiVersion: authentication.stackable.tech/v1alpha1
-kind: AuthenticationClass
-metadata:
- name: nifi-users
-spec:
- provider:
- static:
- userCredentialsSecret:
- name: nifi-users
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: nifi-users
-stringData:
- admin: >
- passwordWithSpecialCharacter\@<&>"'
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: nifi-sensitive-property-key
-stringData:
- nifiSensitivePropsKey: mYsUp3rS3cr3tk3y
----
-apiVersion: zookeeper.stackable.tech/v1alpha1
-kind: ZookeeperZnode
-metadata:
- name: nifi-znode
-spec:
- clusterRef:
- name: zookeeper
----
-# We need to create the NifiCluster last, so that the ConfigMaps/Secrets it mounts are already
-# existing to prevent unnecessary Pod restarts.
-apiVersion: nifi.stackable.tech/v1alpha1
-kind: NifiCluster
-metadata:
- name: nifi
-spec:
- image:
-{% if test_scenario['values']['nifi-v1'].find(",") > 0 %}
- custom: "{{ test_scenario['values']['nifi-v1'].split(',')[1] }}"
- productVersion: "{{ test_scenario['values']['nifi-v1'].split(',')[0] }}"
-{% else %}
- custom: null
- productVersion: "{{ test_scenario['values']['nifi-v1'] }}"
-{% endif %}
- pullPolicy: IfNotPresent
- clusterConfig:
- zookeeperConfigMapName: nifi-znode
- authentication:
- - authenticationClass: nifi-users
- hostHeaderCheck:
- allowAll: false
- additionalAllowedHosts:
- - example.com:1234
- sensitiveProperties:
- keySecret: nifi-sensitive-property-key
-{% if lookup('env', 'VECTOR_AGGREGATOR') %}
- vectorAggregatorConfigMapName: vector-aggregator-discovery
-{% endif %}
- nodes:
- envOverrides:
- COMMON_VAR: role-value # overridden by role group below
- ROLE_VAR: role-value # only defined here at role level
- configOverrides:
- "nifi.properties":
- "nifi.diagnostics.on.shutdown.enabled": "true"
- "nifi.diagnostics.on.shutdown.verbose": "false"
- # Quicker startup, and we only have a single node
- "nifi.cluster.flow.election.max.wait.time": "10 secs"
- config:
- logging:
- enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
- roleConfig:
- listenerClass: {{ test_scenario['values']['listener-class'] }}
- roleGroups:
- default:
- replicas: 2
- envOverrides:
- COMMON_VAR: group-value # overrides role value
- GROUP_VAR: group-value # only defined here at group level
- configOverrides:
- "nifi.properties":
- "nifi.diagnostics.on.shutdown.enabled": "false"
- "nifi.diagnostics.on.shutdown.max.filecount": "20"
diff --git a/tests/templates/kuttl/smoke_v1/50-install-test-nifi.yaml b/tests/templates/kuttl/smoke_v1/50-install-test-nifi.yaml
deleted file mode 100644
index dc8a0b3..0000000
--- a/tests/templates/kuttl/smoke_v1/50-install-test-nifi.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-apiVersion: apps/v1
-kind: StatefulSet
-metadata:
- name: test-nifi
- labels:
- app: test-nifi
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: test-nifi
- template:
- metadata:
- labels:
- app: test-nifi
- spec:
- containers:
- - name: test-nifi
- image: oci.stackable.tech/sdp/testing-tools/nifi:0.3.0-stackable0.0.0-dev
- command: ["sleep", "infinity"]
- resources:
- requests:
- memory: "128Mi"
- cpu: "100m"
- limits:
- memory: "128Mi"
- cpu: "400m"
diff --git a/tests/templates/kuttl/smoke_v1/test_nifi_metrics.py b/tests/templates/kuttl/smoke_v1/test_nifi_metrics.py
deleted file mode 100755
index 86fd42a..0000000
--- a/tests/templates/kuttl/smoke_v1/test_nifi_metrics.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env python
-import argparse
-import requests
-import time
-from requests.exceptions import ConnectionError
-
-if __name__ == "__main__":
- # Construct an argument parser
- all_args = argparse.ArgumentParser()
- # Add arguments to the parser
- all_args.add_argument(
- "-m",
- "--metric",
- required=False,
- default="nifi_amount_bytes_read",
- help="The name of a certain metric to check",
- )
- all_args.add_argument(
- "-n", "--namespace", required=True, help="The namespace the test is running in"
- )
- all_args.add_argument(
- "-p",
- "--port",
- required=False,
- default="8081",
- help="The port where metrics are exposed",
- )
- all_args.add_argument(
- "-t",
- "--timeout",
- required=False,
- default="120",
- help="The timeout in seconds to wait for the metrics port to be opened",
- )
-
- args = vars(all_args.parse_args())
- metric_name = args["metric"]
- namespace = args["namespace"]
- port = args["port"]
- timeout = int(args["timeout"])
-
- url = f"http://nifi-node-default-metrics.{namespace}.svc.cluster.local:{port}/metrics/"
-
- # wait for 'timeout' seconds
- t_end = time.time() + timeout
- while time.time() < t_end:
- try:
- response = requests.get(url)
- response.raise_for_status()
- if metric_name in response.text:
- print("Test metrics succeeded!")
- exit(0)
- else:
- print(
- f"Could not find metric [{metric_name}] in response:\n {response.text}"
- )
- time.sleep(timeout)
- except ConnectionError:
- # NewConnectionError is expected until metrics are available
- time.sleep(10)
-
- exit(-1)
diff --git a/tests/templates/kuttl/smoke_v2/00-patch-ns.yaml.j2 b/tests/templates/kuttl/smoke_v2/00-patch-ns.yaml.j2
deleted file mode 100644
index 67185ac..0000000
--- a/tests/templates/kuttl/smoke_v2/00-patch-ns.yaml.j2
+++ /dev/null
@@ -1,9 +0,0 @@
-{% if test_scenario['values']['openshift'] == 'true' %}
-# see https://github.com/stackabletech/issues/issues/566
----
-apiVersion: kuttl.dev/v1beta1
-kind: TestStep
-commands:
- - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}'
- timeout: 120
-{% endif %}
diff --git a/tests/templates/kuttl/smoke_v2/00-range-limit.yaml b/tests/templates/kuttl/smoke_v2/00-range-limit.yaml
deleted file mode 100644
index 8fd0221..0000000
--- a/tests/templates/kuttl/smoke_v2/00-range-limit.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-apiVersion: v1
-kind: LimitRange
-metadata:
- name: limit-request-ratio
-spec:
- limits:
- - type: "Container"
- maxLimitRequestRatio:
- cpu: 5
- memory: 1
diff --git a/tests/templates/kuttl/smoke_v2/10-assert.yaml.j2 b/tests/templates/kuttl/smoke_v2/10-assert.yaml.j2
deleted file mode 100644
index 50b1d4c..0000000
--- a/tests/templates/kuttl/smoke_v2/10-assert.yaml.j2
+++ /dev/null
@@ -1,10 +0,0 @@
----
-apiVersion: kuttl.dev/v1beta1
-kind: TestAssert
-{% if lookup('env', 'VECTOR_AGGREGATOR') %}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: vector-aggregator-discovery
-{% endif %}
diff --git a/tests/templates/kuttl/smoke_v2/10-install-vector-aggregator-discovery-configmap.yaml.j2 b/tests/templates/kuttl/smoke_v2/10-install-vector-aggregator-discovery-configmap.yaml.j2
deleted file mode 100644
index 2d6a0df..0000000
--- a/tests/templates/kuttl/smoke_v2/10-install-vector-aggregator-discovery-configmap.yaml.j2
+++ /dev/null
@@ -1,9 +0,0 @@
-{% if lookup('env', 'VECTOR_AGGREGATOR') %}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: vector-aggregator-discovery
-data:
- ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }}
-{% endif %}
diff --git a/tests/templates/kuttl/smoke_v2/30-assert.yaml b/tests/templates/kuttl/smoke_v2/30-assert.yaml
deleted file mode 100644
index 9a31b9e..0000000
--- a/tests/templates/kuttl/smoke_v2/30-assert.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-apiVersion: kuttl.dev/v1beta1
-kind: TestAssert
-timeout: 1200
----
-apiVersion: apps/v1
-kind: StatefulSet
-metadata:
- name: nifi-node-default
- labels:
- restarter.stackable.tech/enabled: "true"
-spec:
- template:
- spec:
- terminationGracePeriodSeconds: 300
-status:
- readyReplicas: 2
- replicas: 2
----
-apiVersion: policy/v1
-kind: PodDisruptionBudget
-metadata:
- name: nifi-node
-status:
- expectedPods: 2
- currentHealthy: 2
- disruptionsAllowed: 1
diff --git a/tests/templates/kuttl/smoke_v2/31-assert.yaml.j2 b/tests/templates/kuttl/smoke_v2/31-assert.yaml.j2
deleted file mode 100644
index 7b2eacd..0000000
--- a/tests/templates/kuttl/smoke_v2/31-assert.yaml.j2
+++ /dev/null
@@ -1,6 +0,0 @@
----
-apiVersion: kuttl.dev/v1beta1
-kind: TestAssert
-timeout: 30
-commands:
-- script: kubectl get cm -n $NAMESPACE nifi-node-default -o yaml | grep -- 'nifi.web.proxy.host=.*example.com:1234' | xargs test ! -z
diff --git a/tests/templates/kuttl/smoke_v2/32-assert.yaml b/tests/templates/kuttl/smoke_v2/32-assert.yaml
deleted file mode 100644
index 960b478..0000000
--- a/tests/templates/kuttl/smoke_v2/32-assert.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-apiVersion: kuttl.dev/v1beta1
-kind: TestAssert
-timeout: 600
-commands:
- #
- # Test envOverrides
- #
- - script: |
- kubectl -n $NAMESPACE get sts nifi-node-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "nifi") | .env[] | select (.name == "COMMON_VAR" and .value == "group-value")'
- kubectl -n $NAMESPACE get sts nifi-node-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "nifi") | .env[] | select (.name == "GROUP_VAR" and .value == "group-value")'
- kubectl -n $NAMESPACE get sts nifi-node-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "nifi") | .env[] | select (.name == "ROLE_VAR" and .value == "role-value")'
- #
- # Test configOverrides
- #
- - script: |
- kubectl -n $NAMESPACE get cm nifi-node-default -o yaml | yq -e '.data."nifi.properties"' | grep "nifi.diagnostics.on.shutdown.enabled=false"
- kubectl -n $NAMESPACE get cm nifi-node-default -o yaml | yq -e '.data."nifi.properties"' | grep "nifi.diagnostics.on.shutdown.verbose=false"
- kubectl -n $NAMESPACE get cm nifi-node-default -o yaml | yq -e '.data."nifi.properties"' | grep "nifi.diagnostics.on.shutdown.max.filecount=20"
diff --git a/tests/templates/kuttl/smoke_v2/33-assert.yaml b/tests/templates/kuttl/smoke_v2/33-assert.yaml
deleted file mode 100644
index 271a8be..0000000
--- a/tests/templates/kuttl/smoke_v2/33-assert.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# This test checks if the containerdebug-state.json file is present and valid
-apiVersion: kuttl.dev/v1beta1
-kind: TestAssert
-timeout: 600
-commands:
- - script: kubectl exec -n $NAMESPACE --container nifi nifi-node-default-0 -- cat /stackable/log/containerdebug-state.json | jq --exit-status '"valid JSON"'
diff --git a/tests/templates/kuttl/smoke_v2/40-assert.yaml b/tests/templates/kuttl/smoke_v2/40-assert.yaml
deleted file mode 100644
index c3bcd76..0000000
--- a/tests/templates/kuttl/smoke_v2/40-assert.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-apiVersion: kuttl.dev/v1beta1
-kind: TestAssert
-timeout: 1200
----
-apiVersion: apps/v1
-kind: StatefulSet
-metadata:
- name: nifi-node-default
-status:
- readyReplicas: 3
- replicas: 3
diff --git a/tests/templates/kuttl/smoke_v2/40-scale-up-nifi.yaml.j2 b/tests/templates/kuttl/smoke_v2/40-scale-up-nifi.yaml.j2
deleted file mode 100644
index 37ded26..0000000
--- a/tests/templates/kuttl/smoke_v2/40-scale-up-nifi.yaml.j2
+++ /dev/null
@@ -1,8 +0,0 @@
----
-apiVersion: kuttl.dev/v1beta1
-kind: TestStep
-commands:
- - script: >-
- kubectl --namespace $NAMESPACE
- patch nificlusters.nifi.stackable.tech nifi
- --type=merge --patch '{"spec":{"nodes": {"roleGroups": {"default": {"replicas": 3}}}}}'
diff --git a/tests/templates/kuttl/smoke_v2/50-assert.yaml b/tests/templates/kuttl/smoke_v2/50-assert.yaml
deleted file mode 100644
index f56ce23..0000000
--- a/tests/templates/kuttl/smoke_v2/50-assert.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-apiVersion: kuttl.dev/v1beta1
-kind: TestAssert
-timeout: 1200
----
-apiVersion: apps/v1
-kind: StatefulSet
-metadata:
- name: test-nifi
-status:
- readyReplicas: 1
- replicas: 1
diff --git a/tests/templates/kuttl/smoke_v2/60-assert.yaml.j2 b/tests/templates/kuttl/smoke_v2/60-assert.yaml.j2
deleted file mode 100644
index 1d531af..0000000
--- a/tests/templates/kuttl/smoke_v2/60-assert.yaml.j2
+++ /dev/null
@@ -1,7 +0,0 @@
----
-apiVersion: kuttl.dev/v1beta1
-kind: TestAssert
-timeout: 300
-commands:
- - script: kubectl exec -n $NAMESPACE test-nifi-0 -- python /tmp/test_nifi.py -u admin -p 'passwordWithSpecialCharacter\@<&>"'"'" -n $NAMESPACE -c 3
- - script: kubectl exec -n $NAMESPACE test-nifi-0 -- python /tmp/test_nifi_metrics.py -n $NAMESPACE
diff --git a/tests/templates/kuttl/smoke_v2/60-prepare-test-nifi.yaml b/tests/templates/kuttl/smoke_v2/60-prepare-test-nifi.yaml
deleted file mode 100644
index c3ac9b7..0000000
--- a/tests/templates/kuttl/smoke_v2/60-prepare-test-nifi.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-apiVersion: kuttl.dev/v1beta1
-kind: TestStep
-commands:
- - script: kubectl cp -n $NAMESPACE ./test_nifi_metrics.py test-nifi-0:/tmp
- - script: kubectl cp -n $NAMESPACE ./test_nifi.py test-nifi-0:/tmp
- - script: kubectl cp -n $NAMESPACE ./cacert.pem test-nifi-0:/tmp
diff --git a/tests/templates/kuttl/smoke_v2/cacert.pem b/tests/templates/kuttl/smoke_v2/cacert.pem
deleted file mode 100644
index ebe7391..0000000
--- a/tests/templates/kuttl/smoke_v2/cacert.pem
+++ /dev/null
@@ -1,20 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDVTCCAj2gAwIBAgIJAJ8/0entaUgnMA0GCSqGSIb3DQEBCwUAMCYxJDAiBgNV
-BAMMG3NlY3JldC1vcGVyYXRvciBzZWxmLXNpZ25lZDAeFw0yMjAxMTIxNDU3NDVa
-Fw0yNDAxMTIxNTAyNDVaMCYxJDAiBgNVBAMMG3NlY3JldC1vcGVyYXRvciBzZWxm
-LXNpZ25lZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALLKNGhq5gE+
-mL9zFCLqtc22CLk8BSbjesjUEhBK3kxDvFDa2ou5atH0eUFjtOSszay2oBrCTVWK
-wZBsdUkL0HkW/wq9A8EUkQ8EownXnsxpI61CLNGLPpBZc+CRHhyWDD6BqwGvEHEv
-W546mh6k49//7zCiYfTK9/LCKBCFdDV6Sb7mNJ8HbNUj54uwC6iOgH25OCRDh4Bt
-zXoSrV9GLAm6AM25ZFo+ONOUBMtv7pavaR0CFMnAixl2NKV2wyLBYAYnJgdJFzGD
-8mP6HwuR7e2g7PkcyC01EnX4iOIuuKHT/Xl9ynut4nHI7g6popotgashrQ5Jf8MS
-Kf98O12LzSMCAwEAAaOBhTCBgjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRf
-U9OxCBwCqYiUjWqY05sz3a6cmjBABgNVHSMEOTA3oSqkKDAmMSQwIgYDVQQDDBtz
-ZWNyZXQtb3BlcmF0b3Igc2VsZi1zaWduZWSCCQCfP9Hp7WlIJzAOBgNVHQ8BAf8E
-BAMCAYYwDQYJKoZIhvcNAQELBQADggEBAA8Flk1XOb1pH33Mbie5ronP2xw/xf6t
-Ox3PBEZ+5/jSPdIwoSaRp9JoP0L9Rg68jzcl5QMa4pOYWe+C1q8aZP0tjfq1eJfO
-UD5ik2DQgEuoF1ELgW1xoM38vkd8wgE711swDHK2zAsOudSzO4XZ4rQ6kaXXtoej
-2kFhxDYcC+na90LdkJM0kAqrjxlFaP7WgUK+HA2iN00CFSOI9FVdppLtootbcb+y
-+WfXxM7gA9Exg4f2vKGVx7UxB/k4AbPvogBQZvK8VoAQocAhWrw7o2rqAesAw6JD
-WwQjM69TlEfbHYXtTfMbi01Wi5TtVhFCjyXK6KDsqSgU+9McExIy70k=
------END CERTIFICATE-----
diff --git a/tests/templates/kuttl/smoke_v2/test_nifi.py b/tests/templates/kuttl/smoke_v2/test_nifi.py
deleted file mode 100755
index 5c72c1a..0000000
--- a/tests/templates/kuttl/smoke_v2/test_nifi.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/env python
-import requests
-import json
-import argparse
-import urllib3
-from time import sleep
-
-
-def get_token(nifi_host, username, password):
- nifi_headers = {
- "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
- }
- data = {"username": username, "password": password}
-
- # TODO: handle actual errors when connecting properly
- nifi_url = nifi_host + "/nifi-api/access/token"
- response = requests.post(
- nifi_url, headers=nifi_headers, data=data, verify=False
- ) # , cert='./tmp/cacert.pem')
-
- if response.ok:
- nifi_token = response.content.decode("utf-8")
- return "Bearer " + nifi_token
- else:
- print(f"Failed to get token: {response.status_code}: {response.content}")
- exit(-1)
-
-
-if __name__ == "__main__":
- # Construct an argument parser
- all_args = argparse.ArgumentParser()
-
- # Add arguments to the parser
- all_args.add_argument("-u", "--user", required=True, help="Username to connect as")
- all_args.add_argument(
- "-p", "--password", required=True, help="Password for the user"
- )
- all_args.add_argument(
- "-n", "--namespace", required=True, help="Namespace the test is running in"
- )
- all_args.add_argument(
- "-c", "--count", required=True, help="The expected number of Nodes"
- )
- args = vars(all_args.parse_args())
-
- # disable warnings as we have specified non-verified https connections
- urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
-
- host = f"https://nifi-node-default-1.nifi-node-default-headless.{args['namespace']}.svc.cluster.local:8443"
- token = get_token(host, args["user"], args["password"])
- headers = {"Authorization": token}
- node_count = int(args["count"])
-
- x = 0
- while x < 15:
- url = host + "/nifi-api/controller/cluster"
- cluster = requests.get(
- url, headers=headers, verify=False
- ) # , cert='/tmp/cacert.pem')
- if cluster.status_code != 200:
- print("Waiting for cluster...")
- else:
- cluster_data = json.loads(cluster.content.decode("utf-8"))
- nodes = cluster_data["cluster"]["nodes"]
- if len(nodes) != node_count:
- print(
- f"Cluster should have {node_count} nodes at this stage, but has: {len(nodes)}"
- )
- else:
- connected = True
- for node in nodes:
- if node["status"] != "CONNECTED":
- print(
- f"Node {node['nodeId']} is in state {node['status']} but should have been CONNECTED"
- )
- connected = False
- if connected:
- print("Test succeeded!")
- exit(0)
- print("Retrying...")
- x = x + 1
- sleep(10)
-
- print("Test failed")
- exit(-1)
diff --git a/tests/test-definition.yaml b/tests/test-definition.yaml
index 38e1b6e..ad82730 100644
--- a/tests/test-definition.yaml
+++ b/tests/test-definition.yaml
@@ -2,7 +2,6 @@
dimensions:
- name: nifi
values:
- - 1.28.1
- 2.6.0
- 2.7.2
- 2.9.0
@@ -11,7 +10,7 @@ dimensions:
# - 2.6.0,oci.stackable.tech/sandbox/nifi:2.6.0-stackable0.0.0-dev
- name: nifi_old
values:
- - 1.28.1
+ - 2.6.0
- name: nifi_new
values:
- 2.9.0
@@ -27,16 +26,6 @@ dimensions:
values:
- 2.7.2
- 2.9.0
- # TODO: Can be removed once NiFi 1.x.x is removed - only for separate smoke tests
- - name: nifi-v1
- values:
- - 1.28.1
- # TODO: Can be removed once NiFi 1.x.x is removed - only for separate smoke tests
- - name: nifi-v2
- values:
- - 2.6.0
- - 2.7.2
- - 2.9.0
# Use Kubernetes manager if set to false
- name: use-zookeeper-manager
values:
@@ -99,17 +88,9 @@ tests:
- nifi
- zookeeper-latest
- openshift
- # TODO: Can be removed once NiFi 1.x.x is removed - only for separate smoke tests
- - name: smoke_v1
+ - name: smoke
dimensions:
- - nifi-v1
- - zookeeper
- - listener-class
- - openshift
- # TODO: Can be renamed to smoke once NiFi 1.x.x is removed - only for separate smoke tests
- - name: smoke_v2
- dimensions:
- - nifi-v2
+ - nifi
- zookeeper
- use-zookeeper-manager
- listener-class
@@ -136,7 +117,7 @@ tests:
- openshift
- name: cluster-sync-cs-bug
dimensions:
- - nifi-v2
+ - nifi
- openshift
- name: oidc-opa
dimensions:| @@ -90,26 +73,17 @@ dimensions: | |||
| tests: | |||
| - name: upgrade | |||
Member
There was a problem hiding this comment.
IMHO we don't want to remove the upgrade test. Instead of 1.28.1 -> 2.9.0 it now tests 2.6.0 -> 2.9.0.
The nifi_old and nifi_new are the version to bump from/to, so we still need them
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of stackabletech/docker-images#1498.
This PR updates the NiFi versions in the integration tests as well as the list of supported versions in the docs.