aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/vespa/model/admin/otel/OpenTelemetryConfigGeneratorTest.java
blob: 7c4968aac84187a382ec98d6d56ab69cc6dd2a42 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.admin.otel;

import com.yahoo.config.model.ApplicationConfigProducerRoot.StatePortInfo;
import org.junit.jupiter.api.Test;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;

/**
 * @author arnej
 */
public class OpenTelemetryConfigGeneratorTest {

    @Test
    void testBuildsYaml() {
        var generator = new OpenTelemetryConfigGenerator(null);
        generator.addStatePorts(List.of(new StatePortInfo("localhost", 19098, "config-sentinel", "sentinel")));
        String yaml = generator.generate();
        assertTrue(yaml.contains("sentinel"));
    }

}