Skip to content

Commit 51162b9

Browse files
committed
chore(stackable-versioned): Remove roundtrip tests
These tests are removed for now, because we are not able to roundtrip CRD conversions without data loss yet. This feature will be re-added in a follow-up PR in an improved form once loss-less roundtripping is supported.
1 parent 57011ab commit 51162b9

16 files changed

+0
-946
lines changed

crates/stackable-operator/src/crd/authentication/core/mod.rs

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -153,61 +153,3 @@ pub mod versioned {
153153
oidc: Option<oidc::v1alpha1::ClientAuthenticationOptions<O>>,
154154
}
155155
}
156-
157-
#[cfg(test)]
158-
impl stackable_versioned::flux_converter::test_utils::RoundtripTestData
159-
for v1alpha1::AuthenticationClassSpec
160-
{
161-
fn get_roundtrip_test_data() -> Vec<Self> {
162-
crate::utils::yaml_from_str_singleton_map(indoc::indoc! {"
163-
- provider:
164-
static:
165-
userCredentialsSecret:
166-
name: simple-users-credentials
167-
- provider:
168-
ldap:
169-
hostname: my.ldap.server
170-
port: 389
171-
searchBase: ou=users,dc=example,dc=org
172-
searchFilter: foo
173-
bindCredentials:
174-
secretClass: openldap-bind-credentials
175-
ldapFieldNames:
176-
email: email
177-
givenName: givenName
178-
group: group
179-
surname: surname
180-
uid: uid
181-
tls:
182-
verification:
183-
server:
184-
caCert:
185-
secretClass: s3-cert
186-
- provider:
187-
oidc:
188-
hostname: my.keycloak.server
189-
port: 8080
190-
rootPath: /realms/master
191-
scopes:
192-
- email
193-
- openid
194-
- profile
195-
principalClaim: preferred_username
196-
providerHint: Keycloak
197-
tls:
198-
verification:
199-
server:
200-
caCert:
201-
secretClass: s3-cert
202-
- provider:
203-
tls: {}
204-
- provider:
205-
tls:
206-
clientCertSecretClass: client-auth-tls
207-
- provider:
208-
kerberos:
209-
kerberosSecretClass: kerberos-auth
210-
"})
211-
.expect("Failed to parse AuthenticationClassSpec YAML")
212-
}
213-
}

crates/stackable-operator/src/crd/listener/class/mod.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,3 @@ pub mod versioned {
6868
pub preferred_address_type: core_v1alpha1::PreferredAddressType,
6969
}
7070
}
71-
72-
#[cfg(test)]
73-
impl stackable_versioned::flux_converter::test_utils::RoundtripTestData
74-
for v1alpha1::ListenerClassSpec
75-
{
76-
fn get_roundtrip_test_data() -> Vec<Self> {
77-
crate::utils::yaml_from_str_singleton_map(indoc::indoc! {"
78-
- serviceType: ClusterIP
79-
- serviceType: NodePort
80-
- serviceType: LoadBalancer
81-
- serviceType: ClusterIP
82-
loadBalancerAllocateNodePorts: false
83-
loadBalancerClass: foo
84-
serviceAnnotations:
85-
foo: bar
86-
serviceExternalTrafficPolicy: Local
87-
preferredAddressType: HostnameConservative
88-
"})
89-
.expect("Failed to parse ListenerClassSpec YAML")
90-
}
91-
}

crates/stackable-operator/src/crd/listener/listeners/mod.rs

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -163,56 +163,3 @@ pub mod versioned {
163163
Cluster,
164164
}
165165
}
166-
167-
#[cfg(test)]
168-
impl stackable_versioned::flux_converter::test_utils::RoundtripTestData for v1alpha1::ListenerSpec {
169-
fn get_roundtrip_test_data() -> Vec<Self> {
170-
crate::utils::yaml_from_str_singleton_map(indoc::indoc! {"
171-
- {}
172-
- className: cluster-internal
173-
extraPodLabelSelectorLabels: {}
174-
ports: []
175-
publishNotReadyAddresses: true
176-
- className: external-unstable
177-
extraPodLabelSelectorLabels:
178-
foo: bar
179-
ports:
180-
- name: http
181-
port: 8080
182-
protocol: TCP
183-
publishNotReadyAddresses: true
184-
"})
185-
.expect("Failed to parse ListenerSpec YAML")
186-
}
187-
}
188-
189-
#[cfg(test)]
190-
impl stackable_versioned::flux_converter::test_utils::RoundtripTestData
191-
for v1alpha1::PodListenersSpec
192-
{
193-
fn get_roundtrip_test_data() -> Vec<Self> {
194-
crate::utils::yaml_from_str_singleton_map(indoc::indoc! {"
195-
- listeners: {}
196-
- listeners:
197-
foo:
198-
scope: Node
199-
- listeners:
200-
foo:
201-
scope: Cluster
202-
ingressAddresses:
203-
- address: 1.2.3.4
204-
addressType: IP
205-
ports: {}
206-
- listeners:
207-
foo:
208-
scope: Cluster
209-
ingressAddresses:
210-
- address: foo.bar
211-
addressType: Hostname
212-
ports:
213-
http: 8080
214-
https: 8443
215-
"})
216-
.expect("Failed to parse PodListenersSpec YAML")
217-
}
218-
}

crates/stackable-operator/src/crd/s3/bucket/mod.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -49,34 +49,3 @@ pub mod versioned {
4949
pub connection: conn_v1alpha1::ConnectionSpec,
5050
}
5151
}
52-
53-
#[cfg(test)]
54-
impl stackable_versioned::flux_converter::test_utils::RoundtripTestData for v1alpha1::BucketSpec {
55-
fn get_roundtrip_test_data() -> Vec<Self> {
56-
crate::utils::yaml_from_str_singleton_map(indoc::indoc! {"
57-
- bucketName: my-example-bucket
58-
connection:
59-
reference: my-connection-resource
60-
- bucketName: foo
61-
connection:
62-
inline:
63-
host: s3.example.com
64-
- bucketName: foo
65-
connection:
66-
inline:
67-
host: s3.example.com
68-
port: 1234
69-
accessStyle: VirtualHosted
70-
credentials:
71-
secretClass: s3-credentials
72-
region:
73-
name: eu-west-1
74-
tls:
75-
verification:
76-
server:
77-
caCert:
78-
secretClass: s3-cert
79-
"})
80-
.expect("Failed to parse BucketSpec YAML")
81-
}
82-
}

crates/stackable-operator/src/crd/s3/connection/mod.rs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -101,38 +101,6 @@ pub mod versioned {
101101
}
102102
}
103103

104-
#[cfg(test)]
105-
impl stackable_versioned::flux_converter::test_utils::RoundtripTestData
106-
for v1alpha1::ConnectionSpec
107-
{
108-
fn get_roundtrip_test_data() -> Vec<Self> {
109-
crate::utils::yaml_from_str_singleton_map(indoc::indoc! {"
110-
- host: s3.example.com
111-
- host: s3.example.com
112-
port: 1234
113-
accessStyle: VirtualHosted
114-
credentials:
115-
secretClass: s3-credentials
116-
region:
117-
name: eu-west-1
118-
tls: null
119-
- host: s3.example.com
120-
region:
121-
name: us-east-1
122-
tls:
123-
verification:
124-
none: {}
125-
- host: s3.example.com
126-
tls:
127-
verification:
128-
server:
129-
caCert:
130-
secretClass: s3-cert
131-
"})
132-
.expect("Failed to parse ConnectionSpec YAML")
133-
}
134-
}
135-
136104
#[cfg(test)]
137105
mod tests {
138106
use std::collections::BTreeMap;

crates/stackable-versioned-macros/src/codegen/flux_converter.rs

Lines changed: 0 additions & 131 deletions
This file was deleted.

crates/stackable-versioned-macros/src/codegen/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use crate::{
1010

1111
pub mod changes;
1212
pub mod container;
13-
pub mod flux_converter;
1413
pub mod item;
1514
pub mod module;
1615

0 commit comments

Comments
 (0)