Skip to content

Commit 6bfeedb

Browse files
committed
fix test
1 parent 3e1ccbe commit 6bfeedb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

examples/kms/kms.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
func main() {
1414
// Specify the project ID
15-
projectId := "66b03760-125b-4c63-9624-741e8a418c02"
15+
projectId := "PROJECT_ID"
1616
region := "eu01"
1717

1818
// Create a new API client, that uses default authentication and configuration

services/kms/wait/wait_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ func TestCreateOrUpdateKeyWaitHandler(t *testing.T) {
183183
handler := CreateOrUpdateKeyWaitHandler(ctx, client, testProject, testRegion, testKeyRingId, testKeyId)
184184
got, err := handler.SetTimeout(1 * time.Second).
185185
SetThrottle(250 * time.Millisecond).
186+
SetSleepBeforeWait(50 * time.Millisecond).
186187
WaitWithContext(ctx)
187188

188189
if (err != nil) != tt.wantErr {
@@ -267,6 +268,7 @@ func TestDeleteKeyWaitHandler(t *testing.T) {
267268
handler := DeleteKeyWaitHandler(ctx, client, testProject, testRegion, testKeyRingId, testKeyId)
268269
_, err := handler.SetTimeout(1 * time.Second).
269270
SetThrottle(250 * time.Millisecond).
271+
SetSleepBeforeWait(50 * time.Millisecond).
270272
WaitWithContext(ctx)
271273

272274
if tt.wantErr != (err != nil) {
@@ -347,6 +349,7 @@ func TestEnableKeyVersionWaitHandler(t *testing.T) {
347349
handler := EnableKeyVersionWaitHandler(ctx, client, testProject, testRegion, testKeyRingId, testKeyId, 1)
348350
got, err := handler.SetTimeout(1 * time.Second).
349351
SetThrottle(250 * time.Millisecond).
352+
SetSleepBeforeWait(50 * time.Millisecond).
350353
WaitWithContext(ctx)
351354

352355
if (err != nil) != tt.wantErr {
@@ -431,6 +434,7 @@ func TestDisableKeyVersionWaitHandler(t *testing.T) {
431434
handler := DisableKeyVersionWaitHandler(ctx, client, testProject, testRegion, testKeyRingId, testKeyId, 1)
432435
_, err := handler.SetTimeout(1 * time.Second).
433436
SetThrottle(250 * time.Millisecond).
437+
SetSleepBeforeWait(50 * time.Millisecond).
434438
WaitWithContext(ctx)
435439

436440
if tt.wantErr != (err != nil) {
@@ -511,6 +515,7 @@ func TestCreateWrappingWaitHandler(t *testing.T) {
511515
handler := CreateWrappingKeyWaitHandler(ctx, client, testProject, testRegion, testKeyRingId, testKeyId)
512516
got, err := handler.SetTimeout(1 * time.Second).
513517
SetThrottle(250 * time.Millisecond).
518+
SetSleepBeforeWait(50 * time.Millisecond).
514519
WaitWithContext(ctx)
515520

516521
if (err != nil) != tt.wantErr {

0 commit comments

Comments
 (0)