MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / test_provider

Function test_provider

crates/openshell-server/src/grpc/policy.rs:4351–4366  ·  view source on GitHub ↗
(name: &str, provider_type: &str)

Source from the content-addressed store, hash-verified

4349 }
4350
4351 fn test_provider(name: &str, provider_type: &str) -> Provider {
4352 Provider {
4353 metadata: Some(openshell_core::proto::datamodel::v1::ObjectMeta {
4354 id: format!("provider-{name}"),
4355 name: name.to_string(),
4356 created_at_ms: 1_000_000,
4357 labels: HashMap::new(),
4358 resource_version: 0,
4359 }),
4360 r#type: provider_type.to_string(),
4361 credentials: std::iter::once(("GITHUB_TOKEN".to_string(), "ghp-test".to_string()))
4362 .collect(),
4363 config: HashMap::new(),
4364 credential_expires_at_ms: HashMap::new(),
4365 }
4366 }
4367
4368 fn test_policy_with_rule(rule_name: &str, host: &str) -> ProtoSandboxPolicy {
4369 ProtoSandboxPolicy {

Calls

no outgoing calls

Tested by

no test coverage detected