mirror of
https://github.com/containers/podman.git
synced 2025-10-18 19:53:58 +08:00
Fix various integration test issues with SQLite state
Two main changes: - The transient state tests relied on BoltDB paths, change to make them agnostic - The volume code in SQLite wasn't retrieving and setting the volume plugin for volumes that used one. Signed-off-by: Matt Heon <mheon@redhat.com>
This commit is contained in:
@ -54,8 +54,14 @@ var _ = Describe("Podman run with volumes", func() {
|
||||
Expect(filepath.Join(containerStorageDir, "volatile-containers.json")).Should(Not(BeAnExistingFile()))
|
||||
Expect(filepath.Join(runContainerStorageDir, "containers.json")).Should(Not(BeAnExistingFile()))
|
||||
Expect(filepath.Join(runContainerStorageDir, "volatile-containers.json")).Should(Not(BeAnExistingFile()))
|
||||
Expect(filepath.Join(dbDir, "bolt_state.db")).Should(BeARegularFile())
|
||||
Expect(filepath.Join(runDBDir, "bolt_state.db")).Should(Not(BeAnExistingFile()))
|
||||
|
||||
if podmanTest.DatabaseBackend == "sqlite" {
|
||||
Expect(filepath.Join(containerStorageDir, "db.sql")).Should(BeARegularFile())
|
||||
Expect(filepath.Join(runContainerStorageDir, "db.sql")).Should(Not(BeAnExistingFile()))
|
||||
} else {
|
||||
Expect(filepath.Join(dbDir, "bolt_state.db")).Should(BeARegularFile())
|
||||
Expect(filepath.Join(runDBDir, "bolt_state.db")).Should(Not(BeAnExistingFile()))
|
||||
}
|
||||
})
|
||||
|
||||
It("podman run --rm with no transient-store", func() {
|
||||
@ -68,8 +74,14 @@ var _ = Describe("Podman run with volumes", func() {
|
||||
Expect(filepath.Join(containerStorageDir, "volatile-containers.json")).Should(BeARegularFile())
|
||||
Expect(filepath.Join(runContainerStorageDir, "containers.json")).Should(Not(BeAnExistingFile()))
|
||||
Expect(filepath.Join(runContainerStorageDir, "volatile-containers.json")).Should(Not(BeAnExistingFile()))
|
||||
Expect(filepath.Join(dbDir, "bolt_state.db")).Should(BeARegularFile())
|
||||
Expect(filepath.Join(runDBDir, "bolt_state.db")).Should(Not(BeAnExistingFile()))
|
||||
|
||||
if podmanTest.DatabaseBackend == "sqlite" {
|
||||
Expect(filepath.Join(containerStorageDir, "db.sql")).Should(BeARegularFile())
|
||||
Expect(filepath.Join(runContainerStorageDir, "db.sql")).Should(Not(BeAnExistingFile()))
|
||||
} else {
|
||||
Expect(filepath.Join(dbDir, "bolt_state.db")).Should(BeARegularFile())
|
||||
Expect(filepath.Join(runDBDir, "bolt_state.db")).Should(Not(BeAnExistingFile()))
|
||||
}
|
||||
})
|
||||
|
||||
It("podman run --transient-store", func() {
|
||||
@ -83,8 +95,14 @@ var _ = Describe("Podman run with volumes", func() {
|
||||
Expect(filepath.Join(containerStorageDir, "volatile-containers.json")).Should(Not(BeAnExistingFile()))
|
||||
Expect(filepath.Join(runContainerStorageDir, "containers.json")).Should(Not(BeAnExistingFile()))
|
||||
Expect(filepath.Join(runContainerStorageDir, "volatile-containers.json")).Should(BeARegularFile())
|
||||
Expect(filepath.Join(dbDir, "bolt_state.db")).Should(Not(BeAnExistingFile()))
|
||||
Expect(filepath.Join(runDBDir, "bolt_state.db")).Should(BeARegularFile())
|
||||
|
||||
if podmanTest.DatabaseBackend == "sqlite" {
|
||||
Expect(filepath.Join(containerStorageDir, "db.sql")).Should(Not(BeAnExistingFile()))
|
||||
Expect(filepath.Join(runContainerStorageDir, "db.sql")).Should(BeARegularFile())
|
||||
} else {
|
||||
Expect(filepath.Join(dbDir, "bolt_state.db")).Should(Not(BeAnExistingFile()))
|
||||
Expect(filepath.Join(runDBDir, "bolt_state.db")).Should(BeARegularFile())
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user