Search in sources :

Example 1 with APIResourceList

use of com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList in project yakc by manusa.

the class RbacAuthorizationV1IT method getAPIResources.

@Test
@DisplayName("getAPIResources, cluster contains resources for this API version")
void getAPIResources() throws IOException {
    // When
    final APIResourceList result = KC.create(RbacAuthorizationV1Api.class).getAPIResources().get();
    // Then
    assertThat(result).hasFieldOrPropertyWithValue("groupVersion", "rbac.authorization.k8s.io/v1").hasFieldOrPropertyWithValue("apiVersion", "v1").extracting(APIResourceList::getResources).asList().isNotEmpty();
}
Also used : APIResourceList(com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Example 2 with APIResourceList

use of com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList in project yakc by manusa.

the class NodeV1IT method getAPIResources.

@Test
@DisplayName("getAPIResources, cluster contains resources for this API version")
void getAPIResources() throws IOException {
    // When
    final APIResourceList result = KC.create(NodeV1Api.class).getAPIResources().get();
    // Then
    assertThat(result).hasFieldOrPropertyWithValue("groupVersion", "node.k8s.io/v1").hasFieldOrPropertyWithValue("apiVersion", "v1").extracting(APIResourceList::getResources).asList().isNotEmpty();
}
Also used : APIResourceList(com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Example 3 with APIResourceList

use of com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList in project yakc by manusa.

the class EventsV1ApiIT method getAPIResources.

@Test
@DisplayName("getAPIResources, cluster contains resources for this API version")
void getAPIResources() throws IOException {
    // When
    final APIResourceList result = KC.create(EventsV1Api.class).getAPIResources().get();
    // Then
    assertThat(result).hasFieldOrPropertyWithValue("groupVersion", "events.k8s.io/v1").hasFieldOrPropertyWithValue("apiVersion", "v1").extracting(APIResourceList::getResources).asList().isNotEmpty();
}
Also used : APIResourceList(com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Example 4 with APIResourceList

use of com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList in project yakc by manusa.

the class WipIT method other.

@Test
void other() throws IOException {
    final APIResourceList arl = KC.create(CoreV1Api.class).getAPIResources().get();
    System.out.println(arl.toString());
}
Also used : APIResourceList(com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList) Test(org.junit.jupiter.api.Test)

Example 5 with APIResourceList

use of com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList in project yakc by manusa.

the class MetricsV1beta1ApiIT method getAPIResources.

@Test
@DisplayName("getAPIResources, cluster contains resources for this API version")
void getAPIResources() throws IOException {
    // When
    final APIResourceList result = KC.create(MetricsV1beta1Api.class).getAPIResources().get();
    // Then
    assertThat(result).hasFieldOrProperty("apiVersion").hasFieldOrProperty("kind").hasFieldOrPropertyWithValue("groupVersion", "metrics.k8s.io/v1beta1").hasFieldOrPropertyWithValue("apiVersion", "v1").extracting(APIResourceList::getResources).asList().isNotEmpty();
}
Also used : APIResourceList(com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Aggregations

APIResourceList (com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList)5 Test (org.junit.jupiter.api.Test)5 DisplayName (org.junit.jupiter.api.DisplayName)4