func createProject(tb testing.TB, name, desc string) *gogitlab.Project {
	n := name + RandomString(4)
	proj, _, err := GitLabClient.Projects.CreateProject(&gogitlab.CreateProjectOptions{
		Name:        &n,
		Description: &desc,
	})
	if err != nil {
		_, file, line, ok := runtime.Caller(1)
		if !ok {
			tb.Fatalf("Unable to get caller")
		}
		tb.Fatalf("%s:%v %v", path.Base(file), line, err)
	}
	return proj
}
creates a minimal gitlab project with a random string appended
to the given name.
package gitlab
import (
	"net/url"
	"os"
	"path"
	"runtime"
	"strings"
	"testing"
	gogitlab "github.com/xanzy/go-gitlab"
)
var (
	GitLabURI    = os.Getenv("GITLAB_URL")
	GitLabToken  = os.Getenv("GITLAB_TOKEN")
	GitLabAPIURL *url.URL
	GitLabClient *Client
)
func init() {
	var err error
	if GitLabAPIURL, err = url.Parse(strings.TrimSuffix(GitLabURI, "/")); err != nil {
		panic(err)
	}
	if GitLabClient, err = NewClient(GitLabAPIURL, GitLabToken); err != nil {
		panic(err)
	}
}
func before(tb testing.TB) {
	if GitLabURI == "" {
		tb.Skip("GITLAB_URL is not set, should be set in order to run tests (e.g. 'https://gitlab.com')")
	}
	if GitLabToken == "" {
		tb.Skip("GITLAB_TOKEN is not set, should be set in order to run tests")
	}
}