Skip to content

Commit 76805e5

Browse files
author
Shruthi-1MN
committed
end
1 parent 74f207d commit 76805e5

5 files changed

Lines changed: 772 additions & 163 deletions

File tree

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ before_install:
2525
- sudo apt-get install -y build-essential gcc
2626
- sudo apt-get install -y librados-dev librbd-dev
2727
- sudo apt-get install -y lvm2 tgt open-iscsi
28+
- go get -v github.com/onsi/gomega
29+
- go get -v github.com/onsi/ginkgo/ginkgo
30+
- go get github.com/modocache/gover
31+
- go get -v -t ./...
32+
- export PATH=$PATH:$HOME/gopath/bin
2833

2934
matrix:
3035
fast_finish: true

test/integration/client_test.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,32 @@ func TestClientCreateProfile(t *testing.T) {
6060
}
6161
}
6262

63+
func TestClientCreateFileProfile(t *testing.T) {
64+
var body = &model.ProfileSpec{
65+
Name: "policy",
66+
Description: "silver policy",
67+
StorageType: "file",
68+
//CustomProperties: model.CustomPropertiesSpec{
69+
// "diskType": "SAS",
70+
//},
71+
}
72+
73+
prf, err := c.CreateProfile(body)
74+
if err != nil {
75+
t.Error("create profile in client failed:", err)
76+
return
77+
}
78+
// If customized properties are not defined, create an empty one.
79+
//if prf.CustomProperties == nil {
80+
// prf.CustomProperties = model.CustomPropertiesSpec{}
81+
//}
82+
83+
var expected = &SampleProfiles[0]
84+
if !reflect.DeepEqual(prf, expected) {
85+
t.Errorf("expected %+v, got %+v\n", expected, prf)
86+
}
87+
}
88+
6389
func TestClientGetProfile(t *testing.T) {
6490
var prfID = "2f9c0a04-66ef-11e7-ade2-43158893e017"
6591

test/integration/fileshare_suit_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ import (
2020
"fmt"
2121
"testing"
2222

23-
. "github.com/onsi/ginkgo"
24-
. "github.com/onsi/gomega"
23+
"github.com/onsi/ginkgo"
24+
"github.com/onsi/gomega"
2525
)
2626

2727
//Function to run the Ginkgo Test
2828
func TestFileShareIntegration(t *testing.T) {
29-
RegisterFailHandler(Fail)
29+
gomega.RegisterFailHandler(ginkgo.Fail)
3030
//var UID string
31-
var _ = BeforeSuite(func() {
31+
var _ = ginkgo.BeforeSuite(func() {
3232
fmt.Println("Before Suite Execution")
3333

3434
})
35-
AfterSuite(func() {
36-
By("After Suite Execution....!")
35+
ginkgo.AfterSuite(func() {
36+
ginkgo.By("After Suite Execution....!")
3737
})
3838

39-
RunSpecs(t, "File Share Integration Test Suite")
39+
ginkgo.RunSpecs(t, "File Share Integration Test Suite")
4040
}

0 commit comments

Comments
 (0)