Skip to content

Commit b63c674

Browse files
author
Jan Sternagel
committed
make test variables constant
1 parent 7bbcd7a commit b63c674

File tree

5 files changed

+34
-34
lines changed

5 files changed

+34
-34
lines changed

internal/cmd/beta/kms/keyring/create/create_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ import (
1616
)
1717

1818
const (
19-
testRegion = "eu01"
19+
testRegion = "eu01"
20+
testKeyRingName = "my-key-ring"
21+
testDescription = "my-description"
2022
)
2123

2224
type testCtxKey struct{}
2325

2426
var (
25-
testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
26-
testClient = &kms.APIClient{}
27-
testProjectId = uuid.NewString()
28-
testKeyRingName = "my-key-ring"
29-
testDescription = "my-description"
27+
testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
28+
testClient = &kms.APIClient{}
29+
testProjectId = uuid.NewString()
3030
)
3131

3232
// Flags

internal/cmd/beta/kms/version/destroy/destroy_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ import (
1515
)
1616

1717
const (
18-
testRegion = "eu02"
18+
testRegion = "eu02"
19+
testVersionNumber = int64(1)
1920
)
2021

2122
type testCtxKey struct{}
2223

2324
var (
24-
testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
25-
testClient = &kms.APIClient{}
26-
testProjectId = uuid.NewString()
27-
testKeyRingId = uuid.NewString()
28-
testKeyId = uuid.NewString()
29-
testVersionNumber = int64(1)
25+
testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
26+
testClient = &kms.APIClient{}
27+
testProjectId = uuid.NewString()
28+
testKeyRingId = uuid.NewString()
29+
testKeyId = uuid.NewString()
3030
)
3131

3232
// Flags

internal/cmd/beta/kms/version/disable/disable_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ import (
1515
)
1616

1717
const (
18-
testRegion = "eu02"
18+
testRegion = "eu02"
19+
testVersionNumber = int64(1)
1920
)
2021

2122
type testCtxKey struct{}
2223

2324
var (
24-
testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
25-
testClient = &kms.APIClient{}
26-
testProjectId = uuid.NewString()
27-
testKeyRingId = uuid.NewString()
28-
testKeyId = uuid.NewString()
29-
testVersionNumber = int64(1)
25+
testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
26+
testClient = &kms.APIClient{}
27+
testProjectId = uuid.NewString()
28+
testKeyRingId = uuid.NewString()
29+
testKeyId = uuid.NewString()
3030
)
3131

3232
// Flags

internal/cmd/beta/kms/version/enable/enable_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ import (
1515
)
1616

1717
const (
18-
testRegion = "eu02"
18+
testRegion = "eu02"
19+
testVersionNumber = int64(1)
1920
)
2021

2122
type testCtxKey struct{}
2223

2324
var (
24-
testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
25-
testClient = &kms.APIClient{}
26-
testProjectId = uuid.NewString()
27-
testKeyRingId = uuid.NewString()
28-
testKeyId = uuid.NewString()
29-
testVersionNumber = int64(1)
25+
testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
26+
testClient = &kms.APIClient{}
27+
testProjectId = uuid.NewString()
28+
testKeyRingId = uuid.NewString()
29+
testKeyId = uuid.NewString()
3030
)
3131

3232
// Flags

internal/cmd/beta/kms/version/restore/restore_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ import (
1515
)
1616

1717
const (
18-
testRegion = "eu02"
18+
testRegion = "eu02"
19+
testVersionNumber = int64(1)
1920
)
2021

2122
type testCtxKey struct{}
2223

2324
var (
24-
testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
25-
testClient = &kms.APIClient{}
26-
testProjectId = uuid.NewString()
27-
testKeyRingId = uuid.NewString()
28-
testKeyId = uuid.NewString()
29-
testVersionNumber = int64(1)
25+
testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
26+
testClient = &kms.APIClient{}
27+
testProjectId = uuid.NewString()
28+
testKeyRingId = uuid.NewString()
29+
testKeyId = uuid.NewString()
3030
)
3131

3232
// Flags

0 commit comments

Comments
 (0)