Skip to content

Commit

Permalink
end
Browse files Browse the repository at this point in the history
  • Loading branch information
Shruthi-1MN committed Oct 7, 2019
1 parent 74f207d commit 8ffd235
Show file tree
Hide file tree
Showing 5 changed files with 785 additions and 165 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ before_install:
- sudo apt-get install -y build-essential gcc
- sudo apt-get install -y librados-dev librbd-dev
- sudo apt-get install -y lvm2 tgt open-iscsi
- go get -v github.com/onsi/gomega
- go get -v github.com/onsi/ginkgo/ginkgo
- go get github.com/modocache/gover
- go get -v -t ./...
- export PATH=$PATH:$HOME/gopath/bin

matrix:
fast_finish: true
Expand Down
26 changes: 26 additions & 0 deletions test/integration/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,32 @@ func TestClientCreateProfile(t *testing.T) {
}
}

func TestClientCreateFileProfile(t *testing.T) {
var body = &model.ProfileSpec{
Name: "policy",
Description: "silver policy",
StorageType: "file",
//CustomProperties: model.CustomPropertiesSpec{
// "diskType": "SAS",
//},
}

prf, err := c.CreateProfile(body)
if err != nil {
t.Error("create profile in client failed:", err)
return
}
// If customized properties are not defined, create an empty one.
//if prf.CustomProperties == nil {
// prf.CustomProperties = model.CustomPropertiesSpec{}
//}

var expected = &SampleFileShareProfiles[0]
if !reflect.DeepEqual(prf, expected) {
t.Errorf("expected %+v, got %+v\n", expected, prf)
}
}

func TestClientGetProfile(t *testing.T) {
var prfID = "2f9c0a04-66ef-11e7-ade2-43158893e017"

Expand Down
14 changes: 7 additions & 7 deletions test/integration/fileshare_suit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ import (
"fmt"
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
)

//Function to run the Ginkgo Test
func TestFileShareIntegration(t *testing.T) {
RegisterFailHandler(Fail)
gomega.RegisterFailHandler(ginkgo.Fail)
//var UID string
var _ = BeforeSuite(func() {
var _ = ginkgo.BeforeSuite(func() {
fmt.Println("Before Suite Execution")

})
AfterSuite(func() {
By("After Suite Execution....!")
ginkgo.AfterSuite(func() {
ginkgo.By("After Suite Execution....!")
})

RunSpecs(t, "File Share Integration Test Suite")
ginkgo.RunSpecs(t, "File Share Integration Test Suite")
}
Loading

0 comments on commit 8ffd235

Please sign in to comment.