Skip to content

Commit

Permalink
cleanup unused fiels and imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl DeBisschop committed Dec 31, 2019
1 parent 9a7101a commit 71753e0
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 45 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 BioRAFT, Inc. (http://bioraft.com)
* Copyright 2019 BioRAFT, Inc. (https://bioraft.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 BioRAFT, Inc. (http://bioraft.com)
* Copyright 2019 BioRAFT, Inc. (https://bioraft.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,7 @@ public static void addOutput(PluginStepContext context, String group, String nam
if (elevate) {
String groupName = group + "." + name;
context.getOutputContext().addOutput(ContextView.global(), "export", groupName, value);
context.getLogger().log(Constants.DEBUG_LEVEL, "Elevating to globsal ${export." + groupName + "}.");
context.getLogger().log(Constants.DEBUG_LEVEL, "Elevating to global ${export." + groupName + "}.");
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 BioRAFT, Inc. (http://bioraft.com)
* Copyright 2019 BioRAFT, Inc. (https://bioraft.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -93,7 +93,6 @@ public void executeNodeStep(final PluginStepContext context, final Map<String, O
String nodeName = node.getNodename();
throw new NodeStepException(msg, e, FileLookupFailureReason.FileNotReadable, nodeName);
}
return;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 BioRAFT, Inc. (http://bioraft.com)
* Copyright 2019 BioRAFT, Inc. (https://bioraft.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -90,7 +90,6 @@ public void executeStep(PluginStepContext context, Map<String, Object> configura
String msg = "Could not read file " + path;
throw new StepException(msg, e, FileLookupFailureReason.FileNotReadable);
}
return;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 BioRAFT, Inc. (http://bioraft.com)
* Copyright 2019 BioRAFT, Inc. (https://bioraft.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -85,7 +85,7 @@ public void executeNodeStep(PluginStepContext context, Map<String, Object> confi
Matcher matcher;
String line;

if (name == null || name == "") {
if (name == null || name.equals("")) {
name = "data";
}

Expand Down Expand Up @@ -119,9 +119,5 @@ public void executeNodeStep(PluginStepContext context, Map<String, Object> confi
String nodeName = node.getNodename();
throw new NodeStepException(msg, e, FileLookupFailureReason.FileNotReadable, nodeName);
}

// for (Map.Entry<String, String> element : map.entrySet()) {
// FileLookupUtils.addOutput(context, group, element.getKey(), element.getValue(), elevateToGlobal);
// }
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 BioRAFT, Inc. (http://bioraft.com)
* Copyright 2019 BioRAFT, Inc. (https://bioraft.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -83,7 +83,7 @@ public void executeStep(PluginStepContext context, Map<String, Object> configura
Matcher matcher;
String line;

if (name == null || name == "") {
if (name == null || name.equals("")) {
name = "data";
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 BioRAFT, Inc. (http://bioraft.com)
* Copyright 2019 BioRAFT, Inc. (https://bioraft.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,7 +35,6 @@
import org.mockito.runners.MockitoJUnitRunner;

import com.dtolabs.rundeck.core.common.INodeEntry;
import com.dtolabs.rundeck.core.data.DataContext;
import com.dtolabs.rundeck.core.execution.workflow.SharedOutputContext;
import com.dtolabs.rundeck.core.execution.workflow.steps.StepException;
import com.dtolabs.rundeck.plugins.step.PluginStepContext;
Expand All @@ -60,9 +59,6 @@ public class JsonFindValueNodeStepPluginTest {
@Mock
SharedOutputContext sharedOutputContext;

@Mock
DataContext dataContext;

@Captor
ArgumentCaptor<String> groupCaptor;

Expand Down Expand Up @@ -103,7 +99,7 @@ public void returnsValueForSimpleMatch() throws StepException {
int i = 0;
assertEquals("raft", groups.get(i));
assertEquals("key", names.get(i));
assertEquals("v1", values.get(i++));
assertEquals("v1", values.get(i));
}

@Test
Expand All @@ -121,7 +117,7 @@ public void returnsValueForMatchInTree() throws StepException {
int i = 0;
assertEquals("raft", groups.get(i));
assertEquals("key", names.get(i));
assertEquals("school", values.get(i++));
assertEquals("school", values.get(i));
}

@Test
Expand All @@ -139,7 +135,7 @@ public void returnsValueInLaterTree() throws StepException {
int i = 0;
assertEquals("raft", groups.get(i));
assertEquals("key", names.get(i));
assertEquals("212 555-1234", values.get(i++));
assertEquals("212 555-1234", values.get(i));
}

@Test
Expand All @@ -157,7 +153,7 @@ public void returnsValueForInteger() throws StepException {
int i = 0;
assertEquals("raft", groups.get(i));
assertEquals("key", names.get(i));
assertEquals("10021", values.get(i++));
assertEquals("10021", values.get(i));
}

@Test
Expand All @@ -175,7 +171,7 @@ public void returnsValueForDouble() throws StepException {
int i = 0;
assertEquals("raft", groups.get(i));
assertEquals("key", names.get(i));
assertEquals("25.2", values.get(i++));
assertEquals("25.2", values.get(i));
}

@Test
Expand All @@ -193,7 +189,7 @@ public void returnsValueForBoolean() throws StepException {
int i = 0;
assertEquals("raft", groups.get(i));
assertEquals("key", names.get(i));
assertEquals("true", values.get(i++));
assertEquals("true", values.get(i));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import com.dtolabs.rundeck.core.data.DataContext;
import com.dtolabs.rundeck.core.execution.workflow.SharedOutputContext;
import com.dtolabs.rundeck.core.execution.workflow.steps.StepException;
import com.dtolabs.rundeck.plugins.step.PluginStepContext;
Expand All @@ -56,9 +55,6 @@ public class JsonFindValueStepPluginTest {
@Mock
SharedOutputContext sharedOutputContext;

@Mock
DataContext dataContext;

@Captor
ArgumentCaptor<String> groupCaptor;

Expand Down Expand Up @@ -99,7 +95,7 @@ public void returnsValueForSimpleMatch() throws StepException {
int i = 0;
assertEquals("raft", groups.get(i));
assertEquals("key", names.get(i));
assertEquals("v1", values.get(i++));
assertEquals("v1", values.get(i));
}

@Test
Expand All @@ -117,7 +113,7 @@ public void returnsValueForMatchInTree() throws StepException {
int i = 0;
assertEquals("raft", groups.get(i));
assertEquals("key", names.get(i));
assertEquals("school", values.get(i++));
assertEquals("school", values.get(i));
}

@Test
Expand All @@ -135,7 +131,7 @@ public void returnsValueInLaterTree() throws StepException {
int i = 0;
assertEquals("raft", groups.get(i));
assertEquals("key", names.get(i));
assertEquals("212 555-1234", values.get(i++));
assertEquals("212 555-1234", values.get(i));
}

@Test
Expand All @@ -153,7 +149,7 @@ public void returnsValueForInteger() throws StepException {
int i = 0;
assertEquals("raft", groups.get(i));
assertEquals("key", names.get(i));
assertEquals("10021", values.get(i++));
assertEquals("10021", values.get(i));
}

@Test
Expand All @@ -171,7 +167,7 @@ public void returnsValueForDouble() throws StepException {
int i = 0;
assertEquals("raft", groups.get(i));
assertEquals("key", names.get(i));
assertEquals("25.2", values.get(i++));
assertEquals("25.2", values.get(i));
}

@Test
Expand All @@ -189,7 +185,7 @@ public void returnsValueForBoolean() throws StepException {
int i = 0;
assertEquals("raft", groups.get(i));
assertEquals("key", names.get(i));
assertEquals("true", values.get(i++));
assertEquals("true", values.get(i));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 BioRAFT, Inc. (http://bioraft.com)
* Copyright 2019 BioRAFT, Inc. (https://bioraft.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,7 +38,6 @@
import org.mockito.runners.MockitoJUnitRunner;

import com.dtolabs.rundeck.core.common.INodeEntry;
import com.dtolabs.rundeck.core.data.DataContext;
import com.dtolabs.rundeck.core.execution.workflow.SharedOutputContext;
import com.dtolabs.rundeck.core.execution.workflow.steps.StepException;
import com.dtolabs.rundeck.plugins.step.PluginStepContext;
Expand All @@ -63,9 +62,6 @@ public class ScanFileNodeStepPluginTest {
@Mock
SharedOutputContext sharedOutputContext;

@Mock
DataContext dataContext;

@Captor
ArgumentCaptor<String> nameCaptor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import com.dtolabs.rundeck.core.data.DataContext;
import com.dtolabs.rundeck.core.execution.workflow.SharedOutputContext;
import com.dtolabs.rundeck.core.execution.workflow.steps.StepException;
import com.dtolabs.rundeck.plugins.step.PluginStepContext;
Expand All @@ -59,9 +58,6 @@ public class ScanFileStepPluginTest {
@Mock
SharedOutputContext sharedOutputContext;

@Mock
DataContext dataContext;

@Captor
ArgumentCaptor<String> nameCaptor;

Expand Down

0 comments on commit 71753e0

Please sign in to comment.