Skip to content

Commit 0889c70

Browse files
bigtable: system tests
Mocha will run blocks, even if they are skipped. This was causing errors to be thrown if the contributor didn't have the Bigtable env vars set
1 parent c741869 commit 0889c70

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

system-test/bigtable.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,19 @@ function generateTableName() {
3838
}
3939

4040
(isTestable ? describe : describe.skip)('Bigtable', function() {
41-
var bigtable = gcloud.bigtable({
42-
cluster: clusterName,
43-
zone: zoneName
44-
});
41+
var bigtable;
4542

4643
var TABLE_NAME = generateTableName();
47-
var TABLE = bigtable.table(TABLE_NAME);
44+
var TABLE;
4845

4946
before(function(done) {
47+
bigtable = gcloud.bigtable({
48+
cluster: clusterName,
49+
zone: zoneName
50+
});
51+
52+
TABLE = bigtable.table(TABLE_NAME);
53+
5054
bigtable.getTables(function(err, tables) {
5155
if (err) {
5256
done(err);
@@ -126,9 +130,10 @@ function generateTableName() {
126130

127131
describe('column families', function() {
128132
var FAMILY_NAME = 'presidents';
129-
var FAMILY = TABLE.family(FAMILY_NAME);
133+
var FAMILY;
130134

131135
before(function(done) {
136+
FAMILY = TABLE.family(FAMILY_NAME);
132137
FAMILY.create(done);
133138
});
134139

0 commit comments

Comments
 (0)