File tree Expand file tree Collapse file tree 5 files changed +27
-13
lines changed
internal/cmd/intake/runner Expand file tree Collapse file tree 5 files changed +27
-13
lines changed Original file line number Diff line number Diff line change @@ -17,21 +17,23 @@ import (
1717// Define a unique key for the context to avoid collisions
1818type testCtxKey struct {}
1919
20+ const (
21+ testRegion = "eu01"
22+ testDisplayName = "testrunner"
23+ testMaxMessageSizeKiB = int64 (1024 )
24+ testMaxMessagesPerHour = int64 (10000 )
25+ testDescription = "This is a test runner"
26+ testLabelsString = "env=test,team=dev"
27+ )
28+
2029var (
2130 // testCtx dummy context for testing purposes
2231 testCtx = context .WithValue (context .Background (), testCtxKey {}, "foo" )
2332 // testClient mock API client
2433 testClient = & intake.APIClient {}
2534 testProjectId = uuid .NewString ()
26- testRegion = "eu01"
2735
28- // Define test values for flags
29- testDisplayName = "testrunner"
30- testMaxMessageSizeKiB = int64 (1024 )
31- testMaxMessagesPerHour = int64 (10000 )
32- testDescription = "This is a test runner"
33- testLabels = map [string ]string {"env" : "test" , "team" : "dev" }
34- testLabelsString = "env=test,team=dev"
36+ testLabels = map [string ]string {"env" : "test" , "team" : "dev" }
3537)
3638
3739// fixtureFlagValues generates a map of flag values for tests
Original file line number Diff line number Diff line change @@ -16,14 +16,17 @@ import (
1616// Define a unique key for the context to avoid collisions
1717type testCtxKey struct {}
1818
19+ const (
20+ testRegion = "eu01"
21+ )
22+
1923var (
2024 // testCtx is a dummy context for testing purposes
2125 testCtx = context .WithValue (context .Background (), testCtxKey {}, "foo" )
2226 // testClient is a mock API client
2327 testClient = & intake.APIClient {}
2428 testProjectId = uuid .NewString ()
2529 testRunnerId = uuid .NewString ()
26- testRegion = "eu01"
2730)
2831
2932// fixtureArgValues generates a slice of arguments for tests
Original file line number Diff line number Diff line change @@ -15,12 +15,15 @@ import (
1515
1616type testCtxKey struct {}
1717
18+ const (
19+ testRegion = "eu01"
20+ )
21+
1822var (
1923 testCtx = context .WithValue (context .Background (), testCtxKey {}, "foo" )
2024 testClient = & intake.APIClient {}
2125 testProjectId = uuid .NewString ()
2226 testRunnerId = uuid .NewString ()
23- testRegion = "eu01"
2427)
2528
2629func fixtureArgValues (mods ... func (argValues []string )) []string {
Original file line number Diff line number Diff line change @@ -17,12 +17,15 @@ import (
1717
1818type testCtxKey struct {}
1919
20+ const (
21+ testRegion = "eu01"
22+ testLimit = int64 (5 )
23+ )
24+
2025var (
2126 testCtx = context .WithValue (context .Background (), testCtxKey {}, "foo" )
2227 testClient = & intake.APIClient {}
2328 testProjectId = uuid .NewString ()
24- testRegion = "eu01"
25- testLimit = int64 (5 )
2629)
2730
2831func fixtureFlagValues (mods ... func (flagValues map [string ]string )) map [string ]string {
Original file line number Diff line number Diff line change @@ -16,12 +16,15 @@ import (
1616
1717type testCtxKey struct {}
1818
19+ const (
20+ testRegion = "eu01"
21+ )
22+
1923var (
2024 testCtx = context .WithValue (context .Background (), testCtxKey {}, "foo" )
2125 testClient = & intake.APIClient {}
2226 testProjectId = uuid .NewString ()
2327 testRunnerId = uuid .NewString ()
24- testRegion = "eu01"
2528)
2629
2730func fixtureArgValues (mods ... func (argValues []string )) []string {
You can’t perform that action at this time.
0 commit comments