1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-05 12:45:38 +01:00
Files
glusterd2/pkg/utils/volumeutils_test.go
Madhu Rajanna 14854e3d75 removed unit testing for auto-generated files
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-04-26 15:46:30 +05:30

25 lines
496 B
Go

package utils
import (
"testing"
config "github.com/spf13/viper"
"github.com/stretchr/testify/assert"
)
func TestGetVolumeDir(t *testing.T) {
config.Set("localstatedir", "/var/lib/glusterd2")
resp := GetVolumeDir("testvolume")
assert.Equal(t, resp, "/var/lib/glusterd2/vols/testvolume")
}
func TestGetSnapshotDir(t *testing.T) {
config.Set("localstatedir", "/var/lib/glusterd2")
resp := GetSnapshotDir("testvolume")
assert.Equal(t, resp, "/var/lib/glusterd2/snaps/testvolume")
}