Skip to content
This repository has been archived by the owner on Apr 4, 2021. It is now read-only.

Commit

Permalink
FALCON-1964 Should delete temporary JKS file after IT tests for crede…
Browse files Browse the repository at this point in the history
…ntial provider alias

Author: yzheng-hortonworks <yzheng@hortonworks.com>

Reviewers: "Sowmya Ramesh <sramesh@hortonworks.com>, Balu Vellanki <balu@apache.org>"

Closes #146 from yzheng-hortonworks/FALCON-1964
  • Loading branch information
yzheng-hortonworks authored and Sowmya Ramesh committed May 18, 2016
1 parent 4ccd3b1 commit 78bb796
Showing 1 changed file with 12 additions and 1 deletion.
Expand Up @@ -22,6 +22,7 @@
import org.apache.falcon.security.CredentialProviderHelper;
import org.apache.hadoop.conf.Configuration;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.Test;

import java.io.File;
Expand All @@ -39,13 +40,23 @@ public class ApplicationPropertiesTest {
private static final String PROPERTY_2 = "property-key-2";
private static final String JKS_FILE_NAME = "credentials.jks";

private static final File credDir = new File(".");

@AfterClass
public void tearDown() throws Exception {
// delete temporary jks files
File file = new File(credDir, JKS_FILE_NAME);
file.delete();
file = new File(credDir, "." + JKS_FILE_NAME + ".crc");
file.delete();
}

@Test
public void testResolveAlias() throws Exception {
// hadoop credential provider needs to be available
Assert.assertTrue(CredentialProviderHelper.isProviderAvailable());

// clean credential provider store
File credDir = new File(".");
File file = new File(credDir, JKS_FILE_NAME);
file.delete();

Expand Down

0 comments on commit 78bb796

Please sign in to comment.