Skip to content

Commit

Permalink
Use null credentials with bigtable emulator (#992)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgruener authored and sduskis committed Aug 31, 2016
1 parent d6269c8 commit 99ab4a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ private void applyEmulatorEnvironment() {
" environment variable: " + emulatorHost);
}
setUsePlaintextNegotiation(true);
setCredentialOptions(CredentialOptions.nullCredential());
setDataHost(hostPort[0]);
setTableAdminHost(hostPort[0]);
setInstanceAdminHost(hostPort[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public void testEmulator() {
Assert.assertEquals("localhost", options.getInstanceAdminHost());
Assert.assertEquals("localhost", options.getTableAdminHost());
Assert.assertTrue(options.usePlaintextNegotiation());
Assert.assertEquals(CredentialOptions.nullCredential(), options.getCredentialOptions());

setTestEnv(oldEnv);
options = new BigtableOptions.Builder()
Expand All @@ -112,6 +113,7 @@ public void testEmulator() {
Assert.assertEquals(BigtableOptions.BIGTABLE_INSTANCE_ADMIN_HOST_DEFAULT, options.getInstanceAdminHost());
Assert.assertEquals(BigtableOptions.BIGTABLE_TABLE_ADMIN_HOST_DEFAULT, options.getTableAdminHost());
Assert.assertFalse(options.usePlaintextNegotiation());
Assert.assertEquals(CredentialOptions.defaultCredentials(), options.getCredentialOptions());
}

/**
Expand Down

0 comments on commit 99ab4a6

Please sign in to comment.