MCPcopy
hub / github.com/wal-g/wal-g / TestGetBackupByName_Exists

Function TestGetBackupByName_Exists

internal/backup_fetch_test.go:140–146  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

138}
139
140func TestGetBackupByName_Exists(t *testing.T) {
141 folder := testtools.CreateMockStorageFolder()
142 backup, err := internal.GetBackupByName("base_123", utility.BaseBackupPath, folder)
143 assert.NoError(t, err)
144 assert.Equal(t, folder.GetSubFolder(utility.BaseBackupPath), backup.Folder)
145 assert.Equal(t, "base_123", backup.Name)
146}
147
148func TestGetBackupByName_Exists_WithGomock(t *testing.T) {
149 ctrl := gomock.NewController(t)

Callers

nothing calls this directly

Calls 3

CreateMockStorageFolderFunction · 0.92
GetBackupByNameFunction · 0.92
GetSubFolderMethod · 0.65

Tested by

no test coverage detected