Skip to content

Commit

Permalink
#129 fix ec2 node configuration page
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Stasiuk committed Aug 8, 2019
1 parent 1c3e3bf commit 38590ec
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/test/java/com/amazon/jenkins/ec2fleet/UiIntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import hudson.slaves.Cloud;
import hudson.slaves.NodeProperty;
import org.apache.commons.lang.StringUtils;
import org.hamcrest.Matchers;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
Expand All @@ -26,7 +25,6 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;

/**
Expand Down Expand Up @@ -60,6 +58,23 @@ public void shouldShowAsHiddenCloudIdAsOldId() throws IOException, SAXException
assertTrue(StringUtils.isNotBlank(((HtmlTextInput) getElementsByNameWithoutJdk(page, "_.oldId").get(0)).getText()));
}

@Test
public void shouldShowNodeConfigurationPage() throws Exception {
EC2FleetCloud cloud = new EC2FleetCloud(null, null, null, null, null, null, null,
null, null, null, false, false,
0, 0, 0, 0, false, false,
false, 0, 0, false);
j.jenkins.clouds.add(cloud);

j.jenkins.addNode(new EC2FleetNode("node-name", "", "", 1,
Node.Mode.EXCLUSIVE, "", new ArrayList<NodeProperty<?>>(), cloud,
j.createComputerLauncher(null)));

HtmlPage page = j.createWebClient().goTo("computer/node-name/configure");

assertTrue(StringUtils.isNotBlank(((HtmlTextInput) getElementsByNameWithoutJdk(page, "_.name").get(0)).getText()));
}

@Test
public void shouldReplaceCloudForNodesAfterConfigurationSave() throws Exception {
EC2FleetCloud cloud = new EC2FleetCloud(null, null, null, null, null, null, null,
Expand Down

0 comments on commit 38590ec

Please sign in to comment.