Skip to content

Commit f8cb1f1

Browse files
committed
Fix tests
1 parent 6770232 commit f8cb1f1

3 files changed

Lines changed: 30 additions & 55 deletions

File tree

src/main/java/eu/openanalytics/containerproxy/backend/kubernetes/KubernetesBackend.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ private List<GenericKubernetesResource> parseAdditionalManifests(Proxy proxy, St
573573

574574
GenericKubernetesResource fullObject = kubeClient
575575
.genericKubernetesResources(object.getApiVersion(), object.getKind())
576-
.load(new ByteArrayInputStream(manifest.getBytes())).get();
576+
.load(new ByteArrayInputStream(manifest.getBytes())).item();
577577

578578
if (object.getMetadata().getNamespace() == null) {
579579
// the load method (in some cases) automatically sets a namespace when no namespace is provided

src/test/java/eu/openanalytics/containerproxy/test/helpers/PropertyOverrideContextInitializer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
*/
2121
package eu.openanalytics.containerproxy.test.helpers;
2222

23+
import eu.openanalytics.containerproxy.ContainerProxyApplication;
2324
import org.springframework.context.ApplicationContextInitializer;
2425
import org.springframework.context.ConfigurableApplicationContext;
2526
import org.springframework.core.env.MutablePropertySources;
27+
import org.springframework.core.env.PropertiesPropertySource;
2628
import org.springframework.core.env.PropertySource;
2729

2830
import javax.annotation.Nonnull;
@@ -32,6 +34,8 @@ public class PropertyOverrideContextInitializer implements ApplicationContextIni
3234
@Override
3335
public void initialize(@Nonnull ConfigurableApplicationContext configurableApplicationContext) {
3436
MutablePropertySources propertySources = configurableApplicationContext.getEnvironment().getPropertySources();
37+
PropertiesPropertySource defaultProperties = new PropertiesPropertySource("shinyProxyDefaultProperties", ContainerProxyApplication.getDefaultProperties());
38+
propertySources.addFirst(defaultProperties);
3539

3640
// remove any external, file-based property source
3741
// we don't want any application.yml or application.properties to be loaded during the tests

0 commit comments

Comments
 (0)