blob: 5ffced45b4bd972dd9c146a5a82ca349f351bd97 (
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
26
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
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());
}
}
|