Tests that use the kubernetes mock should be configured to trust certificates.
This commit is contained in:
@@ -6,10 +6,13 @@ Spring Cloud integration with Kubernetes
|
||||
### Features
|
||||
|
||||
- Auto configuration for the Kubernetes client
|
||||
- Externalize configuration to ConfigMap
|
||||
- DiscoveryClient implementation for Kubernetes
|
||||
- Health Indicator for Pods
|
||||
- Automatic activation of the "Kubernetes" profile when running inside Kubernetes.
|
||||
- Ribbon discovery in Kubernetes.
|
||||
- Automatic activation of the "Kubernetes" profile when running inside Kubernetes
|
||||
- Ribbon discovery in Kubernetes
|
||||
- Zipkin discovery in Kubernetes
|
||||
- ConfigMap / Archaius Bridge
|
||||
|
||||
|
||||
### Building
|
||||
@@ -29,3 +32,4 @@ The project provides a "starter" module, so you just need to add the following d
|
||||
<version>x.y.z</version>
|
||||
</dependency>
|
||||
|
||||
## Configuring the
|
||||
|
||||
@@ -33,6 +33,7 @@ import spock.lang.Specification
|
||||
[
|
||||
"spring.application.name=testapp",
|
||||
"spring.cloud.kubernetes.client.namespace=testns",
|
||||
"spring.cloud.kubernetes.client.trustCerts=true",
|
||||
"spring.cloud.kubernetes.config.namespace=testns"
|
||||
])
|
||||
@EnableConfigurationProperties
|
||||
@@ -79,9 +80,9 @@ class CoreTest extends Specification {
|
||||
expect:
|
||||
config.getMasterUrl().equals(mockClient.getConfiguration().getMasterUrl());
|
||||
config.getNamespace().equals("testns");
|
||||
config.trustCerts
|
||||
}
|
||||
|
||||
|
||||
def "Kubernetes client bean should be present"() {
|
||||
expect:
|
||||
client != null
|
||||
|
||||
@@ -37,6 +37,7 @@ import spock.lang.Specification
|
||||
[
|
||||
"spring.application.name=testapp",
|
||||
"spring.cloud.kubernetes.client.namespace=testns",
|
||||
"spring.cloud.kubernetes.client.trustCerts=true",
|
||||
"spring.cloud.kubernetes.config.namespace=testns"
|
||||
])
|
||||
@RibbonClient(name = "testapp", configuration = KubernetesRibbonClientConfiguration.class)
|
||||
|
||||
Reference in New Issue
Block a user