-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PT-2281 - provide container name for copying files in the dump
- Implemented error handling when container name is not specified - Added test case for error handling
- Loading branch information
1 parent
b862945
commit 43ae487
Showing
2 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package dumper | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
/* | ||
Unit test for non-existing logs container name error handling | ||
*/ | ||
|
||
func TestGetIndividualFilesError(t *testing.T) { | ||
d := New("", "", "psmdb", "", "") | ||
|
||
err := d.getIndividualFiles("", "", "", "", nil) | ||
|
||
assert.Error(t, err) | ||
assert.ErrorContains(t, err, "Logs container name is not specified") | ||
} |