summaryrefslogtreecommitdiffstats
path: root/javatests/com/google/gerrit/server/schema/HANATest.java
diff options
context:
space:
mode:
Diffstat (limited to 'javatests/com/google/gerrit/server/schema/HANATest.java')
-rw-r--r--javatests/com/google/gerrit/server/schema/HANATest.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/javatests/com/google/gerrit/server/schema/HANATest.java b/javatests/com/google/gerrit/server/schema/HANATest.java
new file mode 100644
index 0000000000..ac5813486f
--- /dev/null
+++ b/javatests/com/google/gerrit/server/schema/HANATest.java
@@ -0,0 +1,44 @@
+// Copyright (C) 2016 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+
+package com.google.gerrit.server.schema;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import org.eclipse.jgit.lib.Config;
+import org.junit.Before;
+import org.junit.Test;
+
+public class HANATest {
+
+ private HANA hana;
+ private Config config;
+
+ @Before
+ public void setup() {
+ config = new Config();
+ config.setString("database", null, "hostname", "my.host");
+ hana = new HANA(config);
+ }
+
+ @Test
+ public void getUrl() throws Exception {
+ config.setString("database", null, "port", "4242");
+ assertThat(hana.getUrl()).isEqualTo("jdbc:sap://my.host:4242");
+ }
+
+ @Test
+ public void getIndexScript() throws Exception {
+ assertThat(hana.getIndexScript()).isSameAs(ScriptRunner.NOOP);
+ }
+}