Search in sources :

Example 6 with AppEngineFlexibleFacet

use of com.google.cloud.tools.intellij.appengine.facet.flexible.AppEngineFlexibleFacet in project google-cloud-intellij by GoogleCloudPlatform.

the class AppEngineFlexibleDeploymentEditorTest method flexibleConfig_javaAppYaml.

@Test
public void flexibleConfig_javaAppYaml() {
    AppEngineFlexibleFacet facet = AppEngineFlexibleFacet.getFacetByModule(javaModule);
    editor.getAppYamlCombobox().setSelectedItem(facet);
    assertThat(editor.getDockerDirectoryPanel().isVisible()).isFalse();
    assertThat(editor.getStagedArtifactNamePanel().isVisible()).isFalse();
    assertThat(editor.getRuntimePanel().isVisible()).isTrue();
    assertThat(editor.getRuntimePanel().getLabelText()).isEqualTo("java");
}
Also used : AppEngineFlexibleFacet(com.google.cloud.tools.intellij.appengine.facet.flexible.AppEngineFlexibleFacet) Test(org.junit.Test)

Example 7 with AppEngineFlexibleFacet

use of com.google.cloud.tools.intellij.appengine.facet.flexible.AppEngineFlexibleFacet in project google-cloud-intellij by GoogleCloudPlatform.

the class AppEngineFlexibleDeploymentEditorTest method serviceNameIsUpdated_whenAppYamlSelectionChanges.

@Test
public void serviceNameIsUpdated_whenAppYamlSelectionChanges() {
    configuration.setModuleName(javaModule.getName());
    editor.resetEditorFrom(configuration);
    assertThat(editor.getCommonConfig().getServiceLabel().getText()).isEqualTo("javaService");
    // Now update to custom service
    AppEngineFlexibleFacet facet = AppEngineFlexibleFacet.getFacetByModule(customModule);
    editor.getAppYamlCombobox().setSelectedItem(facet);
    assertThat(editor.getCommonConfig().getServiceLabel().getText()).isEqualTo("customService");
}
Also used : AppEngineFlexibleFacet(com.google.cloud.tools.intellij.appengine.facet.flexible.AppEngineFlexibleFacet) Test(org.junit.Test)

Example 8 with AppEngineFlexibleFacet

use of com.google.cloud.tools.intellij.appengine.facet.flexible.AppEngineFlexibleFacet in project google-cloud-intellij by GoogleCloudPlatform.

the class AppEngineFlexibleDeploymentEditorTest method flexibleConfig_restoredFromPersistedConfiguration.

@Test
public void flexibleConfig_restoredFromPersistedConfiguration() {
    // set the stored app.yaml to the java yaml
    configuration.setModuleName(javaModule.getName());
    editor.resetEditorFrom(configuration);
    AppEngineFlexibleFacet javaModuleFacet = AppEngineFlexibleFacet.getFacetByModule(javaModule);
    assertThat(editor.getAppYamlCombobox().getSelectedItem()).isEqualTo(javaModuleFacet);
    // set the stored app.yaml to the custom yaml
    configuration.setModuleName(customModule.getName());
    editor.resetEditorFrom(configuration);
    AppEngineFlexibleFacet customModuleFacet = AppEngineFlexibleFacet.getFacetByModule(customModule);
    assertThat(editor.getAppYamlCombobox().getSelectedItem()).isEqualTo(customModuleFacet);
}
Also used : AppEngineFlexibleFacet(com.google.cloud.tools.intellij.appengine.facet.flexible.AppEngineFlexibleFacet) Test(org.junit.Test)

Aggregations

AppEngineFlexibleFacet (com.google.cloud.tools.intellij.appengine.facet.flexible.AppEngineFlexibleFacet)8 Test (org.junit.Test)4 MalformedYamlFileException (com.google.cloud.tools.intellij.appengine.project.MalformedYamlFileException)2 Path (java.nio.file.Path)2 VisibleForTesting (com.google.api.client.repackaged.com.google.common.annotations.VisibleForTesting)1 DefaultDeployConfiguration (com.google.cloud.tools.appengine.api.deploy.DefaultDeployConfiguration)1 CloudSdk (com.google.cloud.tools.appengine.cloudsdk.CloudSdk)1 CloudSdkAppEngineDeployment (com.google.cloud.tools.appengine.cloudsdk.CloudSdkAppEngineDeployment)1 ProcessExitListener (com.google.cloud.tools.appengine.cloudsdk.process.ProcessExitListener)1 ProcessStartListener (com.google.cloud.tools.appengine.cloudsdk.process.ProcessStartListener)1 UserSpecifiedPathDeploymentSource (com.google.cloud.tools.intellij.appengine.cloud.flexible.UserSpecifiedPathDeploymentSource)1 AppEngineFlexibleFacetConfiguration (com.google.cloud.tools.intellij.appengine.facet.flexible.AppEngineFlexibleFacetConfiguration)1 FlexibleFacetEditor (com.google.cloud.tools.intellij.appengine.facet.flexible.FlexibleFacetEditor)1 FlexibleRuntime (com.google.cloud.tools.intellij.appengine.project.AppEngineProjectService.FlexibleRuntime)1 CloudSdkVersionNotifier (com.google.cloud.tools.intellij.appengine.sdk.CloudSdkVersionNotifier)1 GctBundle (com.google.cloud.tools.intellij.util.GctBundle)1 ImmutableList (com.google.common.collect.ImmutableList)1 Gson (com.google.gson.Gson)1 JsonParseException (com.google.gson.JsonParseException)1 TypeToken (com.google.gson.reflect.TypeToken)1