Skip to content

Commit

Permalink
chore: upgrade compose-go to v2 beta
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Meier <[email protected]>
  • Loading branch information
astromechza committed Mar 8, 2024
1 parent 4270f14 commit a91947b
Show file tree
Hide file tree
Showing 16 changed files with 71 additions and 79 deletions.
17 changes: 0 additions & 17 deletions compose.yaml

This file was deleted.

17 changes: 13 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,36 @@ go 1.21
toolchain go1.21.0

require (
github.com/compose-spec/compose-go v1.6.0
github.com/compose-spec/compose-go/v2 v2.0.0-rc.8
github.com/imdario/mergo v0.3.13
github.com/score-spec/score-go v1.2.0
github.com/spf13/cobra v1.6.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.0
github.com/stretchr/testify v1.8.4
github.com/tidwall/sjson v1.2.5
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/distribution/distribution/v3 v3.0.0-20220725133111-4bf3547399eb // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/mattn/go-shellwords v1.0.12 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/tidwall/gjson v1.14.4 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.1.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
)
45 changes: 29 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
github.com/compose-spec/compose-go v1.6.0 h1:7Ol/UULMUtbPmB0EYrETASRoum821JpOh/XaEf+hN+Q=
github.com/compose-spec/compose-go v1.6.0/go.mod h1:os+Ulh2jlZxY1XT1hbciERadjSUU/BtZ6+gcN7vD7J0=
github.com/compose-spec/compose-go/v2 v2.0.0-rc.8 h1:b7l+GqFF+2W4M4kLQUDRTGhqmTiRwT3bYd9X7xrxp5Q=
github.com/compose-spec/compose-go/v2 v2.0.0-rc.8/go.mod h1:bEPizBkIojlQ20pi2vNluBa58tevvj0Y18oUSHPyfdc=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/distribution/distribution/v3 v3.0.0-20220725133111-4bf3547399eb h1:oCCuuU3kMO3sjZH/p7LamvQNW9SWoT4yQuMGcdSxGAE=
github.com/distribution/distribution/v3 v3.0.0-20220725133111-4bf3547399eb/go.mod h1:28YO/VJk9/64+sTGNuYaBjWxrXTPrj0C0XmgTIOjxX4=
github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand All @@ -29,15 +38,16 @@ github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6Ng
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY=
github.com/score-spec/score-go v1.2.0 h1:1fEJXoK3YtL8Ko7RrY5lSfx80/Qs19zM/NJMuG9jlYA=
github.com/score-spec/score-go v1.2.0/go.mod h1:nt6TOq2Ld9SiH3Fd9NF8tiJ9L7S17OE3FNgCrSet5GQ=
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI=
github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM=
github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
Expand All @@ -48,16 +58,19 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o=
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo=
gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A=
gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g=
9 changes: 5 additions & 4 deletions internal/command/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"sort"
"strings"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
"github.com/imdario/mergo"
"github.com/spf13/cobra"
"github.com/tidwall/sjson"
Expand Down Expand Up @@ -220,9 +220,10 @@ func run(cmd *cobra.Command, args []string) error {
// We add the build context to all services and containers here and make a big assumption that all are
// using the image we are building here and now. If this is unexpected, users should use a more complex
// overrides file.
for idx := range proj.Services {
proj.Services[idx].Build = &types.BuildConfig{Context: buildCtx}
proj.Services[idx].Image = ""
for serviceName, service := range proj.Services {
service.Build = &types.BuildConfig{Context: buildCtx}
service.Image = ""
proj.Services[serviceName] = service
}
}

Expand Down
11 changes: 7 additions & 4 deletions internal/compose/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"sort"
"strings"

compose "github.com/compose-spec/compose-go/types"
compose "github.com/compose-spec/compose-go/v2/types"
score "github.com/score-spec/score-go/types"

"github.com/score-spec/score-compose/internal/project"
Expand All @@ -33,7 +33,7 @@ func ConvertSpec(spec *score.Workload, resources map[string]project.OutputLookup
}

var project = compose.Project{
Services: make(compose.Services, 0, len(spec.Containers)),
Services: make(compose.Services),
}

ctx, err := buildContext(spec.Metadata, resources)
Expand Down Expand Up @@ -67,6 +67,7 @@ func ConvertSpec(spec *score.Workload, resources map[string]project.OutputLookup
}
sort.Strings(containerNames)

var firstServiceName string
for _, containerName := range containerNames {
cSpec := spec.Containers[containerName]

Expand Down Expand Up @@ -157,10 +158,12 @@ func ConvertSpec(spec *score.Workload, resources map[string]project.OutputLookup
// if we are not the "first" service, then inherit the network from the first service
if len(project.Services) > 0 {
svc.Ports = nil
svc.NetworkMode = "service:" + project.Services[0].Name
svc.NetworkMode = "service:" + firstServiceName
} else {
firstServiceName = svc.Name
}

project.Services = append(project.Services, svc)
project.Services[svc.Name] = svc
}
return &project, nil
}
10 changes: 5 additions & 5 deletions internal/compose/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"strings"
"testing"

compose "github.com/compose-spec/compose-go/types"
compose "github.com/compose-spec/compose-go/v2/types"
score "github.com/score-spec/score-go/types"
assert "github.com/stretchr/testify/assert"

Expand Down Expand Up @@ -70,7 +70,7 @@ func TestScoreConvert(t *testing.T) {
},
Project: &compose.Project{
Services: compose.Services{
{
"test-backend": {
Name: "test-backend",
Image: "busybox",
Entrypoint: compose.ShellCommand{
Expand Down Expand Up @@ -139,7 +139,7 @@ func TestScoreConvert(t *testing.T) {
},
Project: &compose.Project{
Services: compose.Services{
{
"test-backend": {
Name: "test-backend",
Image: "busybox",
Environment: compose.MappingWithEquals{
Expand Down Expand Up @@ -196,7 +196,7 @@ func TestScoreConvert(t *testing.T) {
},
Project: &compose.Project{
Services: compose.Services{
{
"test-backend": {
Name: "test-backend",
Image: "busybox",
Environment: compose.MappingWithEquals{
Expand All @@ -207,7 +207,7 @@ func TestScoreConvert(t *testing.T) {
{Target: 81, Published: "8081"},
},
},
{
"test-frontend": {
Name: "test-frontend",
Image: "busybox",
Environment: compose.MappingWithEquals{
Expand Down
2 changes: 1 addition & 1 deletion internal/compose/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package compose
import (
"io"

compose "github.com/compose-spec/compose-go/types"
compose "github.com/compose-spec/compose-go/v2/types"
yaml "gopkg.in/yaml.v3"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/compose/write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"bytes"
"testing"

compose "github.com/compose-spec/compose-go/types"
compose "github.com/compose-spec/compose-go/v2/types"
assert "github.com/stretchr/testify/assert"
)

Expand All @@ -27,7 +27,7 @@ func TestYamlEncode(t *testing.T) {
Name: "Should encode the docker-compose spec",
Source: &compose.Project{
Services: compose.Services{
{
"test": {
Name: "test",
Image: "busybox",
Command: compose.ShellCommand{
Expand Down
2 changes: 1 addition & 1 deletion internal/project/envvarprovider/envvarprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"maps"

compose "github.com/compose-spec/compose-go/types"
compose "github.com/compose-spec/compose-go/v2/types"
score "github.com/score-spec/score-go/types"

"github.com/score-spec/score-compose/internal/project"
Expand Down
2 changes: 1 addition & 1 deletion internal/project/legacyvarprovider/legacyvarprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"maps"
"strings"

compose "github.com/compose-spec/compose-go/types"
compose "github.com/compose-spec/compose-go/v2/types"
score "github.com/score-spec/score-go/types"

"github.com/score-spec/score-compose/internal/project"
Expand Down
4 changes: 2 additions & 2 deletions internal/project/monotonic_counting_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"testing"

compose "github.com/compose-spec/compose-go/types"
compose "github.com/compose-spec/compose-go/v2/types"
score "github.com/score-spec/score-go/types"
"github.com/stretchr/testify/assert"
)
Expand Down Expand Up @@ -102,7 +102,7 @@ func TestMonotonicCountingProviderProvision(t *testing.T) {
assert.Equal(t, map[string]interface{}{"value": 1}, resState.State)
assert.Equal(t, map[string]interface{}{"value": 1}, resState.Outputs)

assert.Equal(t, map[string]string{
assert.Equal(t, compose.Mapping{
"foo": "1",
"bar": "2",
}, composeProject.Environment)
Expand Down
2 changes: 1 addition & 1 deletion internal/project/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"slices"

compose "github.com/compose-spec/compose-go/types"
compose "github.com/compose-spec/compose-go/v2/types"
score "github.com/score-spec/score-go/types"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/project/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"slices"
"strings"

compose "github.com/compose-spec/compose-go/types"
compose "github.com/compose-spec/compose-go/v2/types"
"github.com/imdario/mergo"
score "github.com/score-spec/score-go/types"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/project/provision_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

compose "github.com/compose-spec/compose-go/types"
compose "github.com/compose-spec/compose-go/v2/types"
score "github.com/score-spec/score-go/types"
"github.com/stretchr/testify/assert"

Expand Down Expand Up @@ -134,7 +134,7 @@ func TestProvisionResources_multiple(t *testing.T) {
}
assert.Equal(t, map[int]bool{1: true, 2: true, 3: true}, numbers)

assert.Equal(t, map[string]string{
assert.Equal(t, compose.Mapping{
"example.one": "1",
"example.two": "2",
"thing": "3",
Expand Down
2 changes: 1 addition & 1 deletion internal/project/staticprovider/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package staticprovider
import (
"context"

compose "github.com/compose-spec/compose-go/types"
compose "github.com/compose-spec/compose-go/v2/types"
score "github.com/score-spec/score-go/types"

"github.com/score-spec/score-compose/internal/project"
Expand Down
17 changes: 0 additions & 17 deletions score.yaml

This file was deleted.

0 comments on commit a91947b

Please sign in to comment.