You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pl...@apache.org on 2015/11/04 09:25:53 UTC
[27/48] directory-kerby git commit: Run the Token Pre Auth
integration tests as part of the maven build!
Run the Token Pre Auth integration tests as part of the maven build!
Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/a180614b
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/a180614b
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/a180614b
Branch: refs/heads/pkinit-support
Commit: a180614bc68354cd072f41e0e9dcf906f390c8de
Parents: 93485f4
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Oct 6 14:44:42 2015 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Oct 6 14:44:42 2015 +0100
----------------------------------------------------------------------
.../integration/test/TokenLoginTestBase.java | 2 +-
.../TokenLoginTestWithTokenPreauthDisabled.java | 48 --------------------
.../TokenLoginTestWithTokenPreauthEnabled.java | 43 ------------------
.../TokenLoginWithTokenPreauthDisabledTest.java | 48 ++++++++++++++++++++
.../TokenLoginWithTokenPreauthEnabledTest.java | 43 ++++++++++++++++++
5 files changed, 92 insertions(+), 92 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a180614b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestBase.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestBase.java b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestBase.java
index ec7205f..c6f6f89 100644
--- a/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestBase.java
+++ b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestBase.java
@@ -107,7 +107,7 @@ public class TokenLoginTestBase extends LoginTestBase {
authToken.setAudiences(aud);
// Set expiration in 60 minutes
- final Date now = new Date(new Date().getTime() / 1000 * 1000);
+ final Date now = new Date();
Date exp = new Date(now.getTime() + 1000 * 60 * 60);
authToken.setExpirationTime(exp);
http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a180614b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestWithTokenPreauthDisabled.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestWithTokenPreauthDisabled.java b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestWithTokenPreauthDisabled.java
deleted file mode 100644
index 1dd8417..0000000
--- a/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestWithTokenPreauthDisabled.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 limitations
- * under the License.
- *
- */
-package org.apache.kerby.kerberos.kerb.integration.test;
-
-import javax.security.auth.login.LoginException;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Test login with token when token preauth is not allowed by kdc.
- */
-public class TokenLoginTestWithTokenPreauthDisabled extends TokenLoginTestBase {
-
- @Override
- protected Boolean isTokenPreauthAllowed() {
- return false;
- }
-
- @Test(expected = LoginException.class)
- public void testLoginWithTokenStr() throws Exception {
- super.testLoginWithTokenStr();
- Assert.fail("Exception should have been thrown");
- }
-
- @Test(expected = LoginException.class)
- public void testLoginWithTokenCache() throws Exception {
- super.testLoginWithTokenCache();
- Assert.fail("Exception should have been thrown");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a180614b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestWithTokenPreauthEnabled.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestWithTokenPreauthEnabled.java b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestWithTokenPreauthEnabled.java
deleted file mode 100644
index ffa720e..0000000
--- a/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginTestWithTokenPreauthEnabled.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 limitations
- * under the License.
- *
- */
-package org.apache.kerby.kerberos.kerb.integration.test;
-
-import org.junit.Test;
-
-/**
- * Test login with token when token preauth is allowed by kdc.
- */
-public class TokenLoginTestWithTokenPreauthEnabled extends TokenLoginTestBase {
-
- @Override
- protected Boolean isTokenPreauthAllowed() {
- return true;
- }
-
- @Test
- public void testLoginWithTokenStr() throws Exception {
- super.testLoginWithTokenStr();
- }
-
- @Test
- public void testLoginWithTokenCache() throws Exception {
- super.testLoginWithTokenCache();
- }
-}
http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a180614b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginWithTokenPreauthDisabledTest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginWithTokenPreauthDisabledTest.java b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginWithTokenPreauthDisabledTest.java
new file mode 100644
index 0000000..0c98ec7
--- /dev/null
+++ b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginWithTokenPreauthDisabledTest.java
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 limitations
+ * under the License.
+ *
+ */
+package org.apache.kerby.kerberos.kerb.integration.test;
+
+import javax.security.auth.login.LoginException;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test login with token when token preauth is not allowed by kdc.
+ */
+public class TokenLoginWithTokenPreauthDisabledTest extends TokenLoginTestBase {
+
+ @Override
+ protected Boolean isTokenPreauthAllowed() {
+ return false;
+ }
+
+ @Test(expected = LoginException.class)
+ public void testLoginWithTokenStr() throws Exception {
+ super.testLoginWithTokenStr();
+ Assert.fail("Exception should have been thrown");
+ }
+
+ @Test(expected = LoginException.class)
+ public void testLoginWithTokenCache() throws Exception {
+ super.testLoginWithTokenCache();
+ Assert.fail("Exception should have been thrown");
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a180614b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginWithTokenPreauthEnabledTest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginWithTokenPreauthEnabledTest.java b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginWithTokenPreauthEnabledTest.java
new file mode 100644
index 0000000..86faf11
--- /dev/null
+++ b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/TokenLoginWithTokenPreauthEnabledTest.java
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 limitations
+ * under the License.
+ *
+ */
+package org.apache.kerby.kerberos.kerb.integration.test;
+
+import org.junit.Test;
+
+/**
+ * Test login with token when token preauth is allowed by kdc.
+ */
+public class TokenLoginWithTokenPreauthEnabledTest extends TokenLoginTestBase {
+
+ @Override
+ protected Boolean isTokenPreauthAllowed() {
+ return true;
+ }
+
+ @Test
+ public void testLoginWithTokenStr() throws Exception {
+ super.testLoginWithTokenStr();
+ }
+
+ @Test
+ public void testLoginWithTokenCache() throws Exception {
+ super.testLoginWithTokenCache();
+ }
+}