Skip to content

feat(stackable-versioned): Add K8s specific features #857

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

Merged
merged 18 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: deprecation must be done using #[versioned(deprecated(since = "VERSION"))]
--> tests/bad/deprecate.rs:10:9
--> tests/default/fail/deprecate.rs:10:9
|
10 | #[deprecated]
| ^
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> tests/bad/skip_from_all.rs:23:42
--> tests/default/fail/skip_from_all.rs:23:42
|
23 | let foo_v1beta1 = v1beta1::Foo::from(foo_v1alpha1);
| ------------------ ^^^^^^^^^^^^ expected `v1beta1::Foo`, found `v1alpha1::Foo`
Expand All @@ -8,7 +8,7 @@ error[E0308]: mismatched types
|
= note: `v1alpha1::Foo` and `v1beta1::Foo` have similar names, but are actually distinct types
note: `v1alpha1::Foo` is defined in module `crate::main::v1alpha1` of the current crate
--> tests/bad/skip_from_all.rs:4:5
--> tests/default/fail/skip_from_all.rs:4:5
|
4 | / #[versioned(
5 | | version(name = "v1alpha1"),
Expand All @@ -18,7 +18,7 @@ note: `v1alpha1::Foo` is defined in module `crate::main::v1alpha1` of the curren
9 | | )]
| |______^
note: `v1beta1::Foo` is defined in module `crate::main::v1beta1` of the current crate
--> tests/bad/skip_from_all.rs:4:5
--> tests/default/fail/skip_from_all.rs:4:5
|
4 | / #[versioned(
5 | | version(name = "v1alpha1"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> tests/bad/skip_from_version.rs:23:32
--> tests/default/fail/skip_from_version.rs:23:32
|
23 | let foo_v1 = v1::Foo::from(foo_v1beta1);
| ------------- ^^^^^^^^^^^ expected `main::v1::Foo`, found `v1beta1::Foo`
Expand All @@ -8,7 +8,7 @@ error[E0308]: mismatched types
|
= note: `v1beta1::Foo` and `main::v1::Foo` have similar names, but are actually distinct types
note: `v1beta1::Foo` is defined in module `crate::main::v1beta1` of the current crate
--> tests/bad/skip_from_version.rs:4:5
--> tests/default/fail/skip_from_version.rs:4:5
|
4 | / #[versioned(
5 | | version(name = "v1alpha1"),
Expand All @@ -17,7 +17,7 @@ note: `v1beta1::Foo` is defined in module `crate::main::v1beta1` of the current
8 | | )]
| |______^
note: `main::v1::Foo` is defined in module `crate::main::v1` of the current crate
--> tests/bad/skip_from_version.rs:4:5
--> tests/default/fail/skip_from_version.rs:4:5
|
4 | / #[versioned(
5 | | version(name = "v1alpha1"),
Expand Down
13 changes: 10 additions & 3 deletions crates/stackable-versioned-macros/tests/trybuild.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@
// }

#[test]
fn macros() {
fn default_macros() {
let t = trybuild::TestCases::new();
t.pass("tests/good/*.rs");
t.compile_fail("tests/bad/*.rs");
t.pass("tests/default/pass/*.rs");
t.compile_fail("tests/default/fail/*.rs");
}

#[cfg(feature = "k8s")]
#[test]
fn k8s_macros() {
let t = trybuild::TestCases::new();
t.pass("tests/k8s/*.rs");
}
Loading