aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-osgi-testrunner/src/test/java/com/yahoo/vespa/test/samples/UsingTestRuntimeTest.java
blob: 67b236f75a2dfde1f5a20ada818ef71b9c665668 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.yahoo.vespa.test.samples;

import ai.vespa.cloud.Environment;
import ai.vespa.hosted.cd.TestRuntime;
import com.yahoo.vespa.testrunner.Expect;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;

@Expect(successful = 1, status = 2)
public class UsingTestRuntimeTest {

    @Test
    void testTestRuntime() {
        TestRuntime runtime = TestRuntime.get();
        assertEquals(Environment.test, runtime.zone().environment());
        assertEquals("name", runtime.zone().region());
        assertNull(runtime.deploymentToTest().endpoint("dummy"));
        assertEquals("1.2.3", runtime.deploymentToTest().platform());
        assertEquals(321, runtime.deploymentToTest().revision());
        assertEquals(1000, runtime.deploymentToTest().deployedAt().toEpochMilli());
    }

}