mirror of
https://github.com/gfleury/go-bitbucket-v1.git
synced 2025-04-18 22:48:06 -05:00
Adding final test, closes #76
This commit is contained in:
parent
5d0b8f4baf
commit
4f33c2cf14
3
.github/workflows/pr.yaml
vendored
3
.github/workflows/pr.yaml
vendored
@ -20,6 +20,9 @@ jobs:
|
|||||||
- name: Display Go version
|
- name: Display Go version
|
||||||
run: go version
|
run: go version
|
||||||
|
|
||||||
|
- name: Format
|
||||||
|
run: go fmt . && git diff --exit-code
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build -v ./...
|
run: go build -v ./...
|
||||||
|
|
||||||
|
@ -6103,6 +6103,7 @@ func TestDefaultApiService_SetDefaultBranch(t *testing.T) {
|
|||||||
wantErr, integrationTest bool
|
wantErr, integrationTest bool
|
||||||
}{
|
}{
|
||||||
{"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects//repos//branches/default: context canceled"}, true, false},
|
{"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects//repos//branches/default: context canceled"}, true, false},
|
||||||
|
{"goodRequest", fields{client: generateConfigRealLocalServer()}, args{"PRJ", "repo1", "ref/branch/master"}, &APIResponse{Values: map[string]interface{}{}}, false, true},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
if tt.integrationTest != runIntegrationTests {
|
if tt.integrationTest != runIntegrationTests {
|
||||||
@ -6117,6 +6118,7 @@ func TestDefaultApiService_SetDefaultBranch(t *testing.T) {
|
|||||||
t.Errorf("DefaultApiService.SetDefaultBranch() error = %v, wantErr %v", err, tt.wantErr)
|
t.Errorf("DefaultApiService.SetDefaultBranch() error = %v, wantErr %v", err, tt.wantErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
got.Response = nil
|
||||||
if !reflect.DeepEqual(got, tt.want) {
|
if !reflect.DeepEqual(got, tt.want) {
|
||||||
t.Errorf("DefaultApiService.SetDefaultBranch() = %v, want %v", got, tt.want)
|
t.Errorf("DefaultApiService.SetDefaultBranch() = %v, want %v", got, tt.want)
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
{}
|
Loading…
x
Reference in New Issue
Block a user