-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes_test.go
More file actions
36 lines (31 loc) · 1.11 KB
/
types_test.go
File metadata and controls
36 lines (31 loc) · 1.11 KB
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
package main
import (
"os"
"testing"
)
func TestFetchGitHubOrganisations(t *testing.T) {
organisations := FetchGitHubOrganisations(os.Getenv("GHTOKEN"))
if len(organisations) < 1 {
t.Fatalf(`Length of workspaces is %v`, len(organisations))
}
}
func TestFetchGitHubRepos(t *testing.T) {
organisations := FetchGitHubOrganisations(os.Getenv("GHTOKEN"))
repos := FetchGitHubRepos(os.Getenv("GHTOKEN"), organisations[0])
if len(repos) < 1 {
t.Fatalf(`Length of repositories is %v`, len(organisations))
}
}
func TestFetchBitBucketOrganisations(t *testing.T) {
organisations := FetchBitBucketOrganisations(os.Getenv("BBUSER"), os.Getenv("BBAPPPASS"))
if len(organisations) < 1 {
t.Fatalf(`Length of workspaces is %v`, len(organisations))
}
}
func TestFetchRepos(t *testing.T) {
organisations := FetchBitBucketOrganisations(os.Getenv("BBUSER"), os.Getenv("BBAPPPASS"))
repos := FetchBitbucketRepos(os.Getenv("BBUSER"), os.Getenv("BBAPPPASS"), organisations[0])
if len(repos) < 1 {
t.Fatalf(`Length of repositories is %v`, len(organisations))
}
}