@Test public void throwsOnMalformedClusterConfiguration() throws IOException { assertThatThrownBy(() -> deserializeClusterConfiguration(CLUSTER_CONFIG_MALFORMED)) .isInstanceOf(UnrecognizedPropertyException.class) .hasMessageContaining("my-node-set"); }
@Test public void doesNotDeserializeKubernetesClusterConfigurationAsDefaultClusterConfiguration() throws IOException { // This is somewhat limited by the design of KubernetesHostnames, but should at least confirm that we're // attempting to deserialize a k8s configuration as one, and not as a default configuration assertThatThrownBy(() -> deserializeClusterConfiguration(CLUSTER_CONFIG_KUBERNETES)) .hasMessageContaining("k8s stateful set"); }
@Test @Ignore // TODO (jkong): Reenable if/when we find a good solution public void throwsWhenDeserializingClusterConfigurationWithInvalidTypeInformation() throws IOException { assertThatThrownBy(() -> assertDefaultClusterConfigurationCorrect( deserializeClusterConfiguration(CLUSTER_CONFIG_INVALID_TYPE_INFO))) .isInstanceOf(IllegalStateException.class); }
@Test public void canDeserializeClusterConfigurationWithDefaultTypeInformation() throws IOException { assertDefaultClusterConfigurationCorrect(deserializeClusterConfiguration(CLUSTER_CONFIG_DEFAULT_TYPE_INFO)); }
@Test public void canDeserializeClusterConfigurationWithoutTypeInformation() throws IOException { assertDefaultClusterConfigurationCorrect(deserializeClusterConfiguration(CLUSTER_CONFIG_NO_TYPE_INFO)); }