GeezerVison is showing github.com — test(locality): exercise actual publisher and main hook with dual-sta… · arencloud/unf@807a130
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .containerignore +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -15,6 +15,7 @@ ebpf/unf-ebpf-tc/target/ |
15 | 15 | docs/ |
16 | 16 | hack/* |
17 | 17 | !hack/verify-main-locality-bridge.sh |
| 18 | +!hack/verify-main-locality-composition.sh |
18 | 19 | !hack/verify-cni-workload-ownership.sh |
19 | 20 | !hack/verify-local-delivery-device-lifetime.sh |
20 | 21 | !hack/local-delivery-device-gate.jq |
|
Collapse file
Copy file name to clipboardExpand all lines: bins/unf-agent/src/locality_publisher.rs +8Lines changed: 8 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -58,6 +58,14 @@ impl OriginalCut { |
58 | 58 | } |
59 | 59 |
|
60 | 60 | impl BankPublisher { |
| 61 | + #[cfg(test)] |
| 62 | + pub(super) fn selected_for_test(&self, context: &EncryptionLocalityContext) -> Result<bool> { |
| 63 | + match (&self.active, &self.admission) { |
| 64 | + (Some((_, bank)), Some(admission)) => admission.is_published(bank, context), |
| 65 | + _ => Ok(false), |
| 66 | + } |
| 67 | + } |
| 68 | + |
61 | 69 | pub(super) fn clear(&mut self) -> Result<()> { |
62 | 70 | // Retain active ownership if withdrawal fails; the runtime health |
63 | 71 | // supervisor treats that uncertain kernel fence as fatal. |
|
Collapse file
Copy file name to clipboardExpand all lines: bins/unf-agent/src/main.rs +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -20143,6 +20143,7 @@ fn init_tracing() { |
20143 | 20143 | #[cfg(test)] |
20144 | 20144 | mod tests { |
20145 | 20145 | mod key_rotation; |
| 20146 | + mod locality_delivery; |
20146 | 20147 | mod service_reply; |
20147 | 20148 |
|
20148 | 20149 | use super::*; |
|