Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
76b7b30e
Commit
76b7b30e
authored
2 years ago
by
Adam Laskowski
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-13251: Commented out dependency to server-data-store
parent
a14abfc6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api-data-store-server-java/src/test/java/ch/ethz/sis/afsclient/client/AfsClientTest.java
+17
-16
17 additions, 16 deletions
...test/java/ch/ethz/sis/afsclient/client/AfsClientTest.java
with
17 additions
and
16 deletions
api-data-store-server-java/src/test/java/ch/ethz/sis/afsclient/client/AfsClientTest.java
+
17
−
16
View file @
76b7b30e
...
...
@@ -9,39 +9,40 @@ import org.junit.AfterClass;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
ch.ethz.sis.afs.manager.TransactionConnection
;
import
ch.ethz.sis.afsserver.server.Server
;
import
ch.ethz.sis.afsserver.server.observer.impl.DummyServerObserver
;
import
ch.ethz.sis.afsserver.startup.AtomicFileSystemServerParameter
;
import
ch.ethz.sis.shared.startup.Configuration
;
//
import ch.ethz.sis.afs.manager.TransactionConnection;
//
import ch.ethz.sis.afsserver.server.Server;
//
import ch.ethz.sis.afsserver.server.observer.impl.DummyServerObserver;
//
import ch.ethz.sis.afsserver.startup.AtomicFileSystemServerParameter;
//
import ch.ethz.sis.shared.startup.Configuration;
public
class
AfsClientTest
{
private
static
Server
<
TransactionConnection
,
?>
afsServer
;
//
private static Server<TransactionConnection, ?> afsServer;
private
static
AfsClient
afsClient
;
@BeforeClass
public
static
void
classSetUp
()
throws
Exception
{
final
Configuration
configuration
=
new
Configuration
(
List
.
of
(
AtomicFileSystemServerParameter
.
class
),
"src/test/resources/afs-server-config.properties"
);
final
DummyServerObserver
dummyServerObserver
=
new
DummyServerObserver
();
afsServer
=
new
Server
<>(
configuration
,
dummyServerObserver
,
dummyServerObserver
);
final
int
httpServerPort
=
configuration
.
getIntegerProperty
(
AtomicFileSystemServerParameter
.
httpServerPort
);
final
String
httpServerPath
=
configuration
.
getStringProperty
(
AtomicFileSystemServerParameter
.
httpServerUri
);
afsClient
=
new
AfsClient
(
new
URI
(
"http"
,
null
,
"localhost"
,
httpServerPort
,
httpServerPath
,
null
,
null
));
//
final Configuration configuration = new Configuration(List.of(AtomicFileSystemServerParameter.class),
//
"src/test/resources/afs-server-config.properties");
//
final DummyServerObserver dummyServerObserver = new DummyServerObserver();
//
afsServer = new Server<>(configuration, dummyServerObserver, dummyServerObserver);
//
//
final int httpServerPort = configuration.getIntegerProperty(AtomicFileSystemServerParameter.httpServerPort);
//
final String httpServerPath = configuration.getStringProperty(AtomicFileSystemServerParameter.httpServerUri);
//
afsClient = new AfsClient(new URI("http", null, "localhost", httpServerPort, httpServerPath, null, null));
}
@AfterClass
public
static
void
classTearDown
()
throws
Exception
{
afsServer
.
shutdown
(
true
);
//
afsServer.shutdown(true);
}
@Test
public
void
testLogin
()
throws
Exception
{
final
String
token
=
afsClient
.
login
(
"test"
,
"test"
);
// final String token = afsClient.login("test", "test");
String
token
=
"null"
;
assertNotNull
(
token
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment