Skip to content

Commit

Permalink
feat(queue): send test version to queue (#3113)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathnogueira committed Aug 31, 2023
1 parent df2f7c1 commit ac53793
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions go.work.sum
Expand Up @@ -155,6 +155,7 @@ github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiU
github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg=
github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=
Expand Down
7 changes: 6 additions & 1 deletion server/executor/queue.go
Expand Up @@ -319,11 +319,16 @@ func (q Queue) Enqueue(ctx context.Context, job Job) {
propagator().Inject(ctx, propagation.MapCarrier(*job.Headers))
job.Headers.Set("InstanceID", q.instanceID)

version := 1
if job.Test.Version != nil {
version = *job.Test.Version
}

newJob := Job{
Headers: job.Headers,

Test: test.Test{ID: job.Test.ID},
Run: test.Run{ID: job.Run.ID},
Run: test.Run{ID: job.Run.ID, TestVersion: version},

TestSuite: testsuite.TestSuite{ID: job.TestSuite.ID},
TestSuiteRun: testsuite.TestSuiteRun{ID: job.TestSuiteRun.ID},
Expand Down

0 comments on commit ac53793

Please sign in to comment.