Skip to content

Commit f8aecf1

Browse files
author
Shruthi-1MN
committed
end
1 parent 140905a commit f8aecf1

2 files changed

Lines changed: 17 additions & 98 deletions

File tree

test/integration/fileshare_test.go

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,29 @@ var _ = Describe("FileShare Testing", func() {
8282
Expect(err).NotTo(HaveOccurred())
8383
})
8484
It("TC_FS_IT_08: Create file share description with empty string ", func() {
85-
var jsonStr2 = map[string]interface{}{"name": "abcd123", "description": "#FileShare Code!$!test", "size": 2, "profileId": "df40af1a-17b5-48e5-899f-fa098b0bd5da"}
85+
var jsonStr2 = map[string]interface{}{"name": "abcd123", "description": "", "size": 2, "profileId": "df40af1a-17b5-48e5-899f-fa098b0bd5da"}
86+
url := "http://127.0.0.1:50040/v1beta/e93b4c0934da416eb9c8d120c5d04d96/file/shares"
87+
methodName := "POST"
88+
resp, err := utils.ConnectToHTTP(methodName, url, jsonStr2)
89+
Expect(resp.StatusCode).Should(Equal(202))
90+
Expect(err).NotTo(HaveOccurred())
91+
})
92+
It("TC_FS_IT_09: Create file share with description having special characters ", func() {
93+
var jsonStr2 = map[string]interface{}{"name": "abcd124", "description": "#FileShare Code!$!test", "size": 2, "profileId": "df40af1a-17b5-48e5-899f-fa098b0bd5da"}
8694
url := "http://127.0.0.1:50040/v1beta/e93b4c0934da416eb9c8d120c5d04d96/file/shares"
8795
methodName := "POST"
8896
resp, err := utils.ConnectToHTTP(methodName, url, jsonStr2)
8997
Expect(resp.StatusCode).Should(Equal(400))
9098
Expect(err).NotTo(HaveOccurred())
9199
})
100+
It("TC_FS_IT_10: Create file share with description with more than 255 characters ", func() {
101+
var jsonStr2 = map[string]interface{}{"name": "abcd125", "description": "abqwqwqwggg012345678910ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg", "size": 2, "profileId": "df40af1a-17b5-48e5-899f-fa098b0bd5da"}
102+
url := "http://127.0.0.1:50040/v1beta/e93b4c0934da416eb9c8d120c5d04d96/file/shares"
103+
methodName := "POST"
104+
resp, err := utils.ConnectToHTTP(methodName, url, jsonStr2)
105+
Expect(resp.StatusCode).Should(Equal(202))
106+
Expect(err).NotTo(HaveOccurred())
107+
})
92108

93109
})
94110
})

test/integration/sample.go

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)