@@ -411,6 +411,65 @@ static AGENT_TYPE_OTEL_COLLECTOR: LazyLock<AgentTypeValuesTestCase> =
411411 . into ( ) ,
412412 } ) ;
413413
414+ static AGENT_TYPE_OTEL_COLLECTOR_OLD : LazyLock < AgentTypeValuesTestCase > =
415+ LazyLock :: new ( || AgentTypeValuesTestCase {
416+ agent_type : "newrelic/io.opentelemetry.collector:0.1.0" ,
417+ values_k8s : AgentTypeValues {
418+ cases : HashMap :: from ( [
419+ ( "mandatory fields only" , r#"chart_version: "some-version""# ) ,
420+ (
421+ "check all value types are correct" ,
422+ r#"
423+ chart_version: "some-version"
424+ chart_values.nr-k8s-otel-collector:
425+ yaml: object
426+ chart_values.global:
427+ yaml: object
428+ "# ,
429+ ) ,
430+ ] ) ,
431+ additional_env : HashMap :: from ( [
432+ (
433+ Namespace :: EnvironmentVariable . namespaced_name ( "NR_LICENSE_KEY" ) ,
434+ Variable :: new_final_string_variable ( "abcd1234" . to_string ( ) ) ,
435+ ) ,
436+ (
437+ Namespace :: EnvironmentVariable . namespaced_name ( "NR_CLUSTER_NAME" ) ,
438+ Variable :: new_final_string_variable ( "my-test-cluster" . to_string ( ) ) ,
439+ ) ,
440+ (
441+ Namespace :: EnvironmentVariable . namespaced_name ( "NR_STAGING" ) ,
442+ Variable :: new_final_string_variable ( "true" . to_string ( ) ) ,
443+ ) ,
444+ (
445+ Namespace :: EnvironmentVariable . namespaced_name ( "NR_LOW_DATA_MODE" ) ,
446+ Variable :: new_final_string_variable ( "true" . to_string ( ) ) ,
447+ ) ,
448+ (
449+ Namespace :: EnvironmentVariable . namespaced_name ( "NR_VERBOSE_LOG" ) ,
450+ Variable :: new_final_string_variable ( "true" . to_string ( ) ) ,
451+ ) ,
452+ ] ) ,
453+ }
454+ . into ( ) ,
455+ values_onhost : AgentTypeValues {
456+ cases : HashMap :: from ( [
457+ ( "mandatory fields only" , "" ) ,
458+ (
459+ "check all value types are correct" ,
460+ r#"
461+ config: "some file contents"
462+ backoff_delay: "10s"
463+ health_check.path: "/health"
464+ health_check.port: 12345
465+ "# ,
466+ ) ,
467+ ] ) ,
468+ ..Default :: default ( )
469+ }
470+ . into ( ) ,
471+ } ) ;
472+
414473static AGENT_TYPE_PIPELINE_CONTROL_GATEWAY : LazyLock < AgentTypeValuesTestCase > =
415474 LazyLock :: new ( || AgentTypeValuesTestCase {
416475 agent_type : "newrelic/com.newrelic.pipeline_control_gateway:0.1.0" ,
@@ -507,6 +566,7 @@ fn get_agent_type_test_cases() -> impl Iterator<Item = &'static AgentTypeValuesT
507566 & AGENT_TYPE_PROMETHEUS ,
508567 & AGENT_TYPE_FLUENTBIT ,
509568 & AGENT_TYPE_OTEL_COLLECTOR ,
569+ & AGENT_TYPE_OTEL_COLLECTOR_OLD ,
510570 & AGENT_TYPE_PIPELINE_CONTROL_GATEWAY ,
511571 & AGENT_TYPE_EBPF ,
512572 ]
0 commit comments