Skip to content

Commit

Permalink
Fix tests and smells
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Apr 17, 2019
1 parent c5d8b7f commit b161702
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/main/java/nl/esciencecenter/xenon/grpc/MapUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import io.grpc.Status;
import io.grpc.StatusException;
import nl.esciencecenter.xenon.credentials.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -20,6 +19,13 @@
import nl.esciencecenter.xenon.XenonException;
import nl.esciencecenter.xenon.XenonPropertyDescription;
import nl.esciencecenter.xenon.adaptors.NotConnectedException;
import nl.esciencecenter.xenon.credentials.CertificateCredential;
import nl.esciencecenter.xenon.credentials.Credential;
import nl.esciencecenter.xenon.credentials.CredentialMap;
import nl.esciencecenter.xenon.credentials.DefaultCredential;
import nl.esciencecenter.xenon.credentials.KeytabCredential;
import nl.esciencecenter.xenon.credentials.PasswordCredential;
import nl.esciencecenter.xenon.credentials.UserCredential;
import nl.esciencecenter.xenon.filesystems.InvalidPathException;
import nl.esciencecenter.xenon.filesystems.NoSuchPathException;
import nl.esciencecenter.xenon.filesystems.PathAlreadyExistsException;
Expand Down Expand Up @@ -137,6 +143,7 @@ private static Credential mapCredentialMap(XenonProto.CredentialMap credentialMa
break;
case KEYTAB_CREDENTIAL:
cred = new CredentialMap(mapKeyTabCredential(credentialMap.getKeytabCredential()));
break;
case FALLBACK_NOT_SET:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ public void getAdaptorDescription() throws XenonException {

@Test
public void getAdaptorDescription_unknown() throws XenonException {
thrown.expectMessage("NOT_FOUND: nl.esciencecenter.xenon.UnknownAdaptorException: FileSystem adaptor: Adaptor 'bigstore' not found");
thrown.expectMessage("NOT_FOUND: nl.esciencecenter.xenon.UnknownAdaptorException: AdaptorLoader adaptor: Adaptor 'bigstore' not found");

XenonProto.AdaptorName request = XenonProto.AdaptorName.newBuilder()
.setName("bigstore")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void getAdaptorDescription() throws Exception {

@Test
public void getAdaptorDescription_unknown() throws XenonException {
thrown.expectMessage("NOT_FOUND: nl.esciencecenter.xenon.UnknownAdaptorException: Scheduler adaptor: Adaptor 'bigcompute' not found");
thrown.expectMessage("NOT_FOUND: nl.esciencecenter.xenon.UnknownAdaptorException: AdaptorLoader adaptor: Adaptor 'bigcompute' not found");

XenonProto.AdaptorName request = XenonProto.AdaptorName.newBuilder()
.setName("bigcompute")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public void custom() {
expected.setJobOptions(opts);
expected.setName("myjobname");
expected.setMaxMemory(4096);
expected.setSchedulerArguments("schedarg1", "schedarg2");
assertEquals(expected, response);
assertEquals(schedulerArgs, response.getSchedulerArguments());
}
Expand Down

0 comments on commit b161702

Please sign in to comment.