forked from anvil-verifier/anvil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
154 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
28 changes: 28 additions & 0 deletions
28
src/unit_tests/kubernetes_api_objects/local_object_reference.rs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2022 VMware, Inc. | ||
// SPDX-License-Identifier: MIT | ||
use crate::kubernetes_api_objects::exec::affinity::*; | ||
use crate::kubernetes_api_objects::exec::container::*; | ||
use crate::kubernetes_api_objects::exec::object_meta::*; | ||
use crate::kubernetes_api_objects::exec::pod::*; | ||
use crate::kubernetes_api_objects::exec::resource::*; | ||
use crate::kubernetes_api_objects::exec::toleration::*; | ||
use crate::kubernetes_api_objects::exec::volume::*; | ||
use crate::vstd_ext::string_map::*; | ||
use vstd::prelude::*; | ||
use vstd::string::*; | ||
|
||
verus! { | ||
// Tests for LocalObjectReference | ||
#[test] | ||
#[verifier(external)] | ||
pub fn test_kube() { | ||
let kube_local_object_reference = deps_hack::k8s_openapi::api::core::v1::LocalObjectReference { | ||
name: Some("name".to_string()), | ||
}; | ||
|
||
let local_object_reference = LocalObjectReference::from_kube(kube_local_object_reference.clone()); | ||
|
||
assert_eq!(local_object_reference.into_kube(), | ||
kube_local_object_reference); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2022 VMware, Inc. | ||
// SPDX-License-Identifier: MIT | ||
use crate::kubernetes_api_objects::exec::container::*; | ||
use crate::kubernetes_api_objects::exec::object_meta::*; | ||
use crate::kubernetes_api_objects::exec::resource::*; | ||
use crate::kubernetes_api_objects::exec::volume::*; | ||
use crate::vstd_ext::string_map::*; | ||
use vstd::prelude::*; | ||
use vstd::string::*; | ||
|
||
verus! { | ||
// Tests for SecurityContext | ||
#[test] | ||
#[verifier(external)] | ||
pub fn test_kube(){ | ||
let kube_security_context = deps_hack::k8s_openapi::api::core::v1::SecurityContext { | ||
privileged: Some(true), | ||
..Default::default() | ||
}; | ||
|
||
let security_context = SecurityContext::from_kube(kube_security_context.clone()); | ||
|
||
assert_eq!(security_context.into_kube(), | ||
kube_security_context); | ||
} | ||
} |
This file contains 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
This file contains 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