mirror of
https://github.com/kopia/kopia.git
synced 2026-01-24 14:28:06 -05:00
* cli: Added --max-examples-per-bucket flag to 'kopia snapshot estimate' Added and cleaned up a bunch of unit tests. Fixes #1054 * cli: misc tests to increase code coverage of the cli package * ci: move code coverage run into separate GH job
23 lines
742 B
Go
23 lines
742 B
Go
package cli_test
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/kopia/kopia/tests/testenv"
|
|
)
|
|
|
|
func TestBlobShow(t *testing.T) {
|
|
env := testenv.NewCLITest(t, testenv.NewInProcRunner(t))
|
|
|
|
env.RunAndExpectSuccess(t, "repo", "create", "filesystem", "--path", env.RepoDir)
|
|
|
|
someNBlob := strings.Split(env.RunAndExpectSuccess(t, "blob", "list", "--prefix=n")[0], " ")[0]
|
|
someQBlob := strings.Split(env.RunAndExpectSuccess(t, "blob", "list", "--prefix=q")[0], " ")[0]
|
|
env.RunAndExpectSuccess(t, "blob", "show", someNBlob)
|
|
env.RunAndExpectSuccess(t, "blob", "show", someQBlob)
|
|
env.RunAndExpectSuccess(t, "blob", "show", "--decrypt", someNBlob)
|
|
// --decrypt will be ignored
|
|
env.RunAndExpectSuccess(t, "blob", "show", "--decrypt", someQBlob)
|
|
}
|