Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

test: add a system test to list global keys #111

Merged
merged 3 commits into from
Jan 26, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions system-test/no-test.js → system-test/kms.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,4 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.

console.warn('TODO: add system-tests');
const kms = require('../src');
const assert = require('assert');

const client = new kms.v1.KeyManagementServiceClient();

describe('KMS system tests', () => {
it('should list global key rings', async () => {
const projectId = await client.getProjectId();
const parent = client.locationPath(projectId, 'global');

const [keyRings] = await client.listKeyRings({parent});
assert(keyRings);
assert(Array.isArray(keyRings));
});
});