Remove SetResourceConfig from volume tests
@@ -5,6 +5,7 @@ import (
"github.com/concourse/concourse/atc"
"github.com/concourse/concourse/atc/db"
+ "github.com/concourse/concourse/atc/db/dbtest"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -411,31 +412,34 @@ var _ = Describe("Volume", func() {
Describe("Resource cache volumes", func() {
It("returns volume type, resource type, resource version", func() {
- build, err := defaultTeam.CreateOneOffBuild()
- Expect(err).ToNot(HaveOccurred())
-
- resourceCache, err := resourceCacheFactory.FindOrCreateResourceCache(
- db.ForBuild(build.ID()),
- "some-type",
- atc.Version{"some": "version"},
- atc.Source{"some": "source"},
- atc.Params{"some": "params"},
-
- atc.VersionedResourceTypes{
+ scenario := dbtest.Setup(
+ builder.WithPipeline(atc.Config{
+ ResourceTypes: atc.ResourceTypes{
{
- ResourceType: atc.ResourceType{
Name: "some-type",
Type: "some-base-resource-type",
- Source: atc.Source{"some-type": "((source-param))"},
+ Source: atc.Source{
+ "some-type": "source",
},
- Version: atc.Version{"some-custom-type": "version"},
},
},
+ }),
+ builder.WithResourceTypeVersions(
+ "some-type",
+ atc.Version{"some": "version"},
+ atc.Version{"some-custom-type": "version"},
+ ),
)
+
+ build, err := scenario.Team.CreateOneOffBuild()
Expect(err).ToNot(HaveOccurred())
- resourceConfigScope, err := defaultResourceType.SetResourceConfig(
+ resourceCache, err := resourceCacheFactory.FindOrCreateResourceCache(
+ db.ForBuild(build.ID()),
+ "some-type",
+ atc.Version{"some": "version"},
atc.Source{"some": "source"},
+ atc.Params{"some": "params"},
atc.VersionedResourceTypes{
{
ResourceType: atc.ResourceType{
@@ -447,10 +451,7 @@ var _ = Describe("Volume", func() {
},
},
)
- Expect(err).NotTo(HaveOccurred())
-
- resourceConfigScope.SaveVersions(nil, []atc.Version{{"some": "version"}})
- resourceConfigScope.SaveVersions(nil, []atc.Version{{"some-custom-type": "version"}})
+ Expect(err).ToNot(HaveOccurred())
creatingContainer, err := defaultWorker.CreateContainer(db.NewBuildStepContainerOwner(build.ID(), "some-plan", defaultTeam.ID()), db.ContainerMetadata{
Type: "get",
