Skip to content

Commit

Permalink
[SP-4263 | Abhishek/Anuja] Fixed failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
anujachaitanya committed Nov 25, 2024
1 parent 2033bfd commit 61416bd
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 20 deletions.
18 changes: 11 additions & 7 deletions skaha/src/main/java/org/opencadc/skaha/K8SUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public static String getHostName() {

/**
* Helps reduce string constants in many places.
* @return The Skaha namespace
*
* @return The Skaha namespace
*/
public static String getNamespace() {
return "skaha-system";
Expand All @@ -94,11 +95,13 @@ public static String getWorkloadNamespace() {

/**
* Filter out anything not in the alphanumeric or hyphen character set.
* @see <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names/">Kubernetes Object names</a>
* @param sessionID The provided session ID.
* @param type The defined type (desktop, notebook, etc.)
* @param userID The running User's ID.
* @return String sanitized name. Never null.
*
* @param sessionID The provided session ID.
* @param type The defined type (desktop, notebook, etc.)
* @param userID The running User's ID.
* @return String sanitized name. Never null.
* @see <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names/">Kubernetes Object
* names</a>
*/
public static String getJobName(String sessionID, String type, String userID) {
// Replace values that are NOT alphanumeric or a hyphen.
Expand Down Expand Up @@ -133,7 +136,8 @@ public static String getSessionExpiry() {

/**
* Obtain the configured default quota size in Gigabytes.
* @return integer in GB.
*
* @return integer in GB.
*/
public static String getDefaultQuota() {
return System.getenv(K8SUtil.ARC_USER_QUOTA_IN_GB_NAME);
Expand Down
4 changes: 2 additions & 2 deletions skaha/src/main/java/org/opencadc/skaha/SkahaAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ public Image getPublicImage(String imageID) {
}

/**
* It's important to use the correct constructor for the PosixMapperClient, this class will wrap the logic
* based on how the Resource ID of the POSIX mapper was set (URI or URL).
* It's important to use the correct constructor for the PosixMapperClient, this class will wrap the logic based on
* how the Resource ID of the POSIX mapper was set (URI or URL).
*/
protected static class PosixMapperConfiguration {
final URI resourceID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@
import org.opencadc.skaha.utils.CommandExecutioner;
import org.opencadc.skaha.utils.KubectlCommandBuilder;

/**
*
* @author majorb
*/
/** @author majorb */
public class DeleteAction extends SessionAction {

private static final Logger log = Logger.getLogger(DeleteAction.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ static Session constructSession(String k8sOutput, final String topLevelDirectory
}

/**
* Example input is [4444 5555 6666]. Convert to an actual integer array.
* Example input is [4444 5555 6666]. Convert to an actual integer array.
*
* @param inputArray Kubernetes output of an array of integers.
* @return integer array, never null.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static void execute(final String[] command, final OutputStream standardOu
* Delete, if necessary, and recreate the image pull secret for the given registry.
*
* @param registryAuth The registry credentials.
* @param secretName The name of the secret to create.
* @param secretName The name of the secret to create.
* @throws Exception If there is an error creating the secret.
*/
public static void ensureRegistrySecret(final ImageRepositoryAuth registryAuth, final String secretName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
import static org.junit.Assert.assertThrows;
import static org.mockito.Mockito.when;
import static org.opencadc.skaha.utils.TestUtils.set;
import static org.opencadc.skaha.utils.TestUtils.setEnv;

import java.util.List;
import java.util.Set;
Expand All @@ -83,10 +82,7 @@
import org.opencadc.skaha.SkahaAction;
import org.opencadc.skaha.utils.RedisCache;

/**
* @author majorb
*
*/
/** @author majorb */
@RunWith(MockitoJUnitRunner.class)
public class GetActionTest {

Expand Down

0 comments on commit 61416bd

Please sign in to comment.