feat: move distribution builds to platform Docker builder
This commit is contained in:
@@ -1407,7 +1407,28 @@ func TestCoreServicePropagatesDuplicateErrors(t *testing.T) {
|
||||
}
|
||||
|
||||
func newTestCoreService() *CoreService {
|
||||
return newCoreService(repo.NewMemoryStore(), func() time.Time { return fixedTime })
|
||||
svc := newCoreService(repo.NewMemoryStore(), func() time.Time { return fixedTime })
|
||||
svc.ConfigureDistributionBuilder(staticDistributionBuilder{payload: []byte("platform-built-distribution")})
|
||||
return svc
|
||||
}
|
||||
|
||||
type staticDistributionBuilder struct {
|
||||
payload []byte
|
||||
err error
|
||||
}
|
||||
|
||||
func (builder staticDistributionBuilder) Readiness() (bool, string) {
|
||||
if builder.err != nil {
|
||||
return false, builder.err.Error()
|
||||
}
|
||||
return true, ""
|
||||
}
|
||||
|
||||
func (builder staticDistributionBuilder) Build(domain.DistributionBuildInput) ([]byte, error) {
|
||||
if builder.err != nil {
|
||||
return nil, builder.err
|
||||
}
|
||||
return domain.CopyBytes(builder.payload), nil
|
||||
}
|
||||
|
||||
func createPluginAndRunEndpoint(t *testing.T, svc *CoreService) (domain.GamePlugin, domain.RunEndpoint) {
|
||||
|
||||
Reference in New Issue
Block a user