db: structure: add test for no instance vars in group
@@ -3304,6 +3304,7 @@ var _ = Describe("Team", func() {
var (
p1 db.Pipeline
p2 db.Pipeline
+ p3 db.Pipeline
)
BeforeEach(func() {
@@ -3319,6 +3320,12 @@ var _ = Describe("Team", func() {
InstanceVars: atc.InstanceVars{"version": "7.0.x"},
}, defaultPipelineConfig, db.ConfigVersion(0), false)
Expect(err).ToNot(HaveOccurred())
+
+ p3, _, err = defaultTeam.SavePipeline(atc.PipelineRef{
+ Name: "release",
+ InstanceVars: nil,
+ }, defaultPipelineConfig, db.ConfigVersion(0), false)
+ Expect(err).ToNot(HaveOccurred())
})
It("renames every instance", func() {
@@ -3333,6 +3340,10 @@ var _ = Describe("Team", func() {
_, err = p2.Reload()
Expect(err).ToNot(HaveOccurred())
Expect(p2.Name()).To(Equal("new-pipeline"))
+
+ _, err = p3.Reload()
+ Expect(err).ToNot(HaveOccurred())
+ Expect(p3.Name()).To(Equal("new-pipeline"))
})
})
