Skip to content

Commit 925a8e3

Browse files
committed
refactor: Reorder test enums
1 parent acf3d57 commit 925a8e3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

kube-core/src/schema/transform_properties.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::schema::{InstanceType, Metadata, Schema, SchemaObject, SingleOrVec, NULL_SCHEMA};
1+
use crate::schema::{InstanceType, Schema, SchemaObject, SingleOrVec, NULL_SCHEMA};
22

33
/// Take oneOf or anyOf subschema properties and move them them into the schema
44
/// properties.

kube-derive/tests/crd_mixed_enum_test.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ enum InvalidEnum5Spec {
5757
#[kube(group = "clux.dev", version = "v1", kind = "ValidEnum6")]
5858
#[serde(untagged)]
5959
enum ValidEnum6Spec {
60-
B {
60+
A {
6161
/// The inner fields need to have the same schema (so also same description)
6262
inner: u32,
6363
/// An additional field
6464
additional: String,
6565
},
66-
A {
66+
B {
6767
/// The inner fields need to have the same schema (so also same description)
6868
inner: u32,
6969
},
@@ -75,12 +75,12 @@ enum ValidEnum6Spec {
7575
#[kube(group = "clux.dev", version = "v1", kind = "InvalidEnum7")]
7676
#[serde(untagged)]
7777
enum InvalidEnum7Spec {
78-
B {
78+
A {
7979
/// The inner fields need to have the same schema (so also same description)
8080
inner: u32,
8181
additional: String,
8282
},
83-
A {
83+
B {
8484
/// This description differs!
8585
inner: u32,
8686
},
@@ -269,6 +269,7 @@ fn valid_enum_4() {
269269
fn invalid_enum_5() {
270270
InvalidEnum5::crd();
271271
}
272+
272273
#[test]
273274
fn valid_enum_6() {
274275
assert_json_eq!(

0 commit comments

Comments
 (0)