-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucketApiClient_test.go
37 lines (25 loc) · 1.17 KB
/
bitbucketApiClient_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSetBuildStatus(t *testing.T) {
t.Run("Succeeded", func(t *testing.T) {
// act
bitbucketAPIClient := newBitbucketAPIClient()
err := bitbucketAPIClient.SetBuildStatus("KgSCeb8aZpHrUhDAVk5p8D8PA_08MbBpE3SNzFLSaTSd7uflrgOtelObPD6BRpd_AcdrvIvbu23xcWPfuws=", "xivart/inrule-catalogs-live", "3993d790d0a19fc5da450d61dc4de6473be1c440", "succeeded", "10.0.0", "", "")
assert.Nil(t, err)
})
// t.Run("Failed", func(t *testing.T) {
// // act
// bitbucketAPIClient := newBitbucketAPIClient()
// err := bitbucketAPIClient.SetBuildStatus("KgSCeb8aZpHrUhDAVk5p8D8PA_08MbBpE3SNzFLSaTSd7uflrgOtelObPD6BRpd_AcdrvIvbu23xcWPfuws=", "xivart/inrule-catalogs-live", "3993d790d0a19fc5da450d61dc4de6473be1c440", "failed")
// assert.Nil(t, err)
// })
// t.Run("Pending", func(t *testing.T) {
// // act
// bitbucketAPIClient := newBitbucketAPIClient()
// err := bitbucketAPIClient.SetBuildStatus("KgSCeb8aZpHrUhDAVk5p8D8PA_08MbBpE3SNzFLSaTSd7uflrgOtelObPD6BRpd_AcdrvIvbu23xcWPfuws=", "xivart/inrule-catalogs-live", "3993d790d0a19fc5da450d61dc4de6473be1c440", "pending")
// assert.Nil(t, err)
// })
}