Commit 28578be0 authored by Lukas Matt's avatar Lukas Matt

Switch to godep and extract federation tests

parent 52a35819
......@@ -15,3 +15,6 @@ node_modules
public/assets
.js$:.js
.css$:.css
# go dep
vendor/
sudo: required
language: go
go: "1.9.x"
services:
- docker
- postgresql
go:
- 1.9.x
env:
global:
- UPDATE_CHANNEL=alpha
......@@ -13,28 +11,39 @@ env:
matrix:
- BUILD_GOOS=linux BUILD_GOARCH=amd64
before_install:
- env # print environment vars for debugging purposes
- psql -c 'create database ganggo;' -U postgres
install:
- make install
# sync asset files only
- rsync -I -az ${TRAVIS_BUILD_DIR}/public $GOPATH/src/gopkg.in/ganggo/ganggo.$VERSION/public
- bash tests/scripts/configure_diaspora.sh
script:
# if we define GOARCH, GOOS and GOARM directly
# it will be resetted after calling install/script function
# to avoid it we wrap the values in the BUILD-variables
- GOARCH=$BUILD_GOARCH GOOS=$BUILD_GOOS GOARM=$BUILD_GOARM make release test
before_deploy:
- export LABEL=$BUILD_GOOS-$BUILD_GOARCH.$UPDATE_CHANNEL
- if [ "$BUILD_GOARCH" == "arm"]; then LABEL=$LABEL"v"$BUILD_GOARM; fi
- if [ "$BUILD_GOOS" == "windows" ]; then LABEL=$LABEL".exe"; fi
- mv updater updater.$LABEL
deploy:
provider: releases
api_key:
secure: BeXZlawzicuTA9QF3RFE4OhpxK9EyPifSiW5KQhPEbkcq+DJeHXi+sXLY0jH3igbBWRU+PhVoeg6KjSTWhCoPy+mj3WuQ3TOgZ660lApBxzqbVyPyEYUoS+hJUETAIi5bQLLk9lt9VnWgD2rE8GvGPbZ//0OkYOL/NcY4wdFo3h6wYbJfWwdeettkrFAce+xjbSscxo8hzShy1UyP1aHq5P4XoUBm6dGCEc9R+AFSGNb0Cb8HFE0Jnp/2ZtMfkIqI4Et9tBp72a7W0tafXJ+ZMdvLg+1+aqH7Z6mL9pStVxXlgzwyd8L8FdI8tpDp09tyfN1fJB04Zk7dF8bpt5P5TyjZqO4m4zOQvq0ZTtfgwl3ZhFX07DjYiriDnZdMt+15xkg+hTCwug6RA0sJEKbVUJ8gqI+sN+SRw/l9VJPJ79FnnpKmkaK0z3De37QhL+HGIB/m/NWeDGKpu5+XNKaRZciy+Eh7V4zE0dWJT7a4XWl3burbj7B9cF28jqQL1MOgTw+B8VNzcpCljuBJwn2rsK3rcpj4gqstCIxCyM84zmS0TAevx+uz1DSBIxKa+qcFrUg6G2Puog4OV7vOaVI9kvI2h14eGvFKw5Ui3X5c5pgrfKbiM/+J7Uq3A9iSjHBheugryiyqwlilXtSrFHt8o51P/87/qkPmVRWAAKJBl0=
file: updater.$LABEL
skip_cleanup: true
on:
tags: true
after_script:
- psql -c 'drop database ganggo;' -U postgres
stages:
- test
- release
jobs:
include:
- stage: test
go_import_path: gopkg.in/ganggo/ganggo.$VERSION
install:
- make install
script:
# if we define GOARCH, GOOS and GOARM directly
# it will be resetted after calling install/script function
# to avoid it we wrap the values in the BUILD-variables
- GOARCH=$BUILD_GOARCH GOOS=$BUILD_GOOS GOARM=$BUILD_GOARM make test
- stage: release
go_import_path: gopkg.in/ganggo/ganggo.$VERSION
install:
- make install
script:
- GOARCH=$BUILD_GOARCH GOOS=$BUILD_GOOS GOARM=$BUILD_GOARM make release
before_deploy:
- export LABEL=$BUILD_GOOS-$BUILD_GOARCH.$UPDATE_CHANNEL
- if [ "$BUILD_GOARCH" == "arm"]; then LABEL=$LABEL"v"$BUILD_GOARM; fi
- if [ "$BUILD_GOOS" == "windows" ]; then LABEL=$LABEL".exe"; fi
- mv updater updater.$LABEL
deploy:
provider: releases
api_key:
secure: BeXZlawzicuTA9QF3RFE4OhpxK9EyPifSiW5KQhPEbkcq+DJeHXi+sXLY0jH3igbBWRU+PhVoeg6KjSTWhCoPy+mj3WuQ3TOgZ660lApBxzqbVyPyEYUoS+hJUETAIi5bQLLk9lt9VnWgD2rE8GvGPbZ//0OkYOL/NcY4wdFo3h6wYbJfWwdeettkrFAce+xjbSscxo8hzShy1UyP1aHq5P4XoUBm6dGCEc9R+AFSGNb0Cb8HFE0Jnp/2ZtMfkIqI4Et9tBp72a7W0tafXJ+ZMdvLg+1+aqH7Z6mL9pStVxXlgzwyd8L8FdI8tpDp09tyfN1fJB04Zk7dF8bpt5P5TyjZqO4m4zOQvq0ZTtfgwl3ZhFX07DjYiriDnZdMt+15xkg+hTCwug6RA0sJEKbVUJ8gqI+sN+SRw/l9VJPJ79FnnpKmkaK0z3De37QhL+HGIB/m/NWeDGKpu5+XNKaRZciy+Eh7V4zE0dWJT7a4XWl3burbj7B9cF28jqQL1MOgTw+B8VNzcpCljuBJwn2rsK3rcpj4gqstCIxCyM84zmS0TAevx+uz1DSBIxKa+qcFrUg6G2Puog4OV7vOaVI9kvI2h14eGvFKw5Ui3X5c5pgrfKbiM/+J7Uq3A9iSjHBheugryiyqwlilXtSrFHt8o51P/87/qkPmVRWAAKJBl0=
file: updater.$LABEL
skip_cleanup: true
on:
tags: true
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
name = "github.com/PuerkitoBio/goquery"
packages = ["."]
revision = "09540e565986583836b5fc792fe951ec5fd201dd"
version = "v1.3.0"
[[projects]]
branch = "master"
name = "github.com/Zauberstuhl/go-xml"
packages = ["."]
revision = "534ffa2167237347a37c82b47c552806709bdba0"
[[projects]]
name = "github.com/agtorre/gocolorize"
packages = ["."]
revision = "f42b554bf7f006936130c9bb4f971afd2d87f671"
version = "v1.0.0"
[[projects]]
branch = "master"
name = "github.com/andybalholm/cascadia"
packages = ["."]
revision = "349dd0209470eabd9514242c688c403c0926d266"
[[projects]]
name = "github.com/aws/aws-sdk-go"
packages = [
"aws",
"aws/awserr",
"aws/awsutil",
"aws/client",
"aws/client/metadata",
"aws/corehandlers",
"aws/credentials",
"aws/credentials/ec2rolecreds",
"aws/credentials/endpointcreds",
"aws/credentials/stscreds",
"aws/defaults",
"aws/ec2metadata",
"aws/endpoints",
"aws/request",
"aws/session",
"aws/signer/v4",
"internal/sdkrand",
"internal/shareddefaults",
"private/protocol",
"private/protocol/query",
"private/protocol/query/queryutil",
"private/protocol/rest",
"private/protocol/restxml",
"private/protocol/xml/xmlutil",
"service/s3",
"service/sts"
]
revision = "63324a33d7e42a386c04d4daec764a3de243492e"
version = "v1.13.0"
[[projects]]
branch = "master"
name = "github.com/dchest/captcha"
packages = ["."]
revision = "6a29415a8364ec2971fdc62d9e415ed53fc20410"
[[projects]]
branch = "master"
name = "github.com/denisenkom/go-mssqldb"
packages = ["."]
revision = "ee492709d4324cdcb051d2ac266b77ddc380f5c5"
[[projects]]
name = "github.com/fatih/structs"
packages = ["."]
revision = "a720dfa8df582c51dee1b36feabb906bde1588bd"
version = "v1.0"
[[projects]]
name = "github.com/go-ini/ini"
packages = ["."]
revision = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a"
version = "v1.32.0"
[[projects]]
name = "github.com/go-sql-driver/mysql"
packages = ["."]
revision = "a0583e0143b1624142adab07e0e97fe106d99561"
version = "v1.3"
[[projects]]
name = "github.com/inconshreveable/log15"
packages = ["term"]
revision = "0decfc6c20d9ca0ad143b0e89dcaa20f810b4fb3"
version = "v2.13"
[[projects]]
branch = "master"
name = "github.com/jinzhu/inflection"
packages = ["."]
revision = "1c35d901db3da928c72a72d8458480cc9ade058f"
[[projects]]
name = "github.com/jmespath/go-jmespath"
packages = ["."]
revision = "0b12d6b5"
[[projects]]
branch = "master"
name = "github.com/jpillora/overseer"
packages = [
".",
"fetcher"
]
revision = "7516f444813ce395f57562c049a0c2ac5e0283cb"
[[projects]]
branch = "master"
name = "github.com/kardianos/osext"
packages = ["."]
revision = "ae77be60afb1dcacde03767a8c37337fad28ac14"
[[projects]]
name = "github.com/klauspost/compress"
packages = [
"flate",
"gzip",
"zlib"
]
revision = "6c8db69c4b49dd4df1fff66996cf556176d0b9bf"
version = "v1.2.1"
[[projects]]
name = "github.com/klauspost/cpuid"
packages = ["."]
revision = "ae7887de9fa5d2db4eaa8174a7eff2c1ac00f2da"
version = "v1.1"
[[projects]]
name = "github.com/klauspost/crc32"
packages = ["."]
revision = "cb6bfca970f6908083f26f39a79009d608efd5cd"
version = "v1.1"
[[projects]]
branch = "master"
name = "github.com/lib/pq"
packages = [
".",
"hstore",
"oid"
]
revision = "88edab0803230a3898347e77b474f8c1820a1f20"
[[projects]]
name = "github.com/mattn/go-colorable"
packages = ["."]
revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072"
version = "v0.0.9"
[[projects]]
name = "github.com/mattn/go-isatty"
packages = ["."]
revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39"
version = "v0.0.3"
[[projects]]
name = "github.com/mattn/go-sqlite3"
packages = ["."]
revision = "6c771bb9887719704b210e87e934f08be014bdb1"
version = "v1.6.0"
[[projects]]
branch = "master"
name = "github.com/mgutz/ansi"
packages = ["."]
revision = "9520e82c474b0a04dd04f8a40959027271bab992"
[[projects]]
name = "github.com/revel/cmd"
packages = [
"harness",
"revel"
]
revision = "97ec1422620f1a83cd13738708a109fe092364ca"
version = "v0.19.0"
[[projects]]
name = "github.com/revel/config"
packages = ["."]
revision = "662332b741dd464a886ab0901379c02b9bc5dc30"
version = "v0.19.0"
[[projects]]
name = "github.com/revel/cron"
packages = ["."]
revision = "5d31bd20c7c41898f91332a03f71069dde3e69aa"
version = "v0.19.0"
[[projects]]
branch = "master"
name = "github.com/revel/log15"
packages = ["."]
revision = "793412a67da6f8d15fede4c38f5c66272478cb8a"
[[projects]]
name = "github.com/revel/modules"
packages = [
"jobs/app/controllers",
"jobs/app/jobs",
"static/app/controllers",
"testrunner/app",
"testrunner/app/controllers"
]
revision = "f97a4d0320f4ee755526333a0286f787a5bf6d8b"
version = "v0.19.0"
[[projects]]
branch = "master"
name = "github.com/revel/pathtree"
packages = ["."]
revision = "41257a1839e945fce74afd070e02bab2ea2c776a"
[[projects]]
name = "github.com/revel/revel"
packages = [
".",
"logger",
"testing"
]
revision = "07d67722d092b5f75865a332ed1a26a5f78e55e5"
version = "v0.19.0"
[[projects]]
branch = "master"
name = "github.com/shaoshing/train"
packages = [
".",
"interpreter"
]
revision = "c76b6fe70b70a926afe20cf76df0e237e59f4655"
[[projects]]
branch = "master"
name = "github.com/xeonx/timeago"
packages = ["."]
revision = "714e6695c468c22fb6431a914d8c5f9d19fa2367"
[[projects]]
branch = "master"
name = "golang.org/x/crypto"
packages = [
"bcrypt",
"blowfish",
"md4"
]
revision = "432090b8f568c018896cd8a0fb0345872bbac6ce"
[[projects]]
branch = "master"
name = "golang.org/x/net"
packages = [
"html",
"html/atom",
"websocket"
]
revision = "cbe0f9307d0156177f9dd5dc85da1a31abc5f2fb"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix"]
revision = "37707fdb30a5b38865cfb95e5aab41707daec7fd"
[[projects]]
name = "gopkg.in/AlecAivazis/survey.v1"
packages = [
".",
"core",
"terminal"
]
revision = "0aa8b6a162b391fe2d95648b7677d1d6ac2090a6"
version = "v1.4.1"
[[projects]]
name = "gopkg.in/fsnotify.v1"
packages = ["."]
revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9"
version = "v1.4.7"
[[projects]]
branch = "master"
name = "gopkg.in/ganggo/api.v0"
packages = [
"app",
"app/controllers",
"app/helpers"
]
revision = "4dbc3ff5780086678438e606427dc5296bd53388"
[[projects]]
branch = "master"
name = "gopkg.in/ganggo/federation.v0"
packages = ["."]
revision = "9abcf5eec0dcc846a94586055522860d79550a70"
[[projects]]
name = "gopkg.in/ganggo/gorm.v2"
packages = [
".",
"dialects/mssql",
"dialects/mysql",
"dialects/postgres",
"dialects/sqlite"
]
revision = "4cacfdfb7921a87c774cbf21382714e07ca0b44f"
version = "v2.0"
[[projects]]
name = "gopkg.in/natefinch/lumberjack.v2"
packages = ["."]
revision = "a96e63847dc3c67d17befa69c303767e2f84e54f"
version = "v2.1"
[[projects]]
branch = "v0"
name = "gopkg.in/stack.v0"
packages = ["."]
revision = "9b43fcefddd0178abdabf4d484ab0d695d0011db"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "b477f15ef881efb47c75e59b99e71745887872fc3b5e741f5d768db5bb55b127"
solver-name = "gps-cdcl"
solver-version = 1
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
required = [
"github.com/revel/cmd/revel",
"github.com/revel/cmd/harness"
]
[[constraint]]
branch = "master"
name = "github.com/dchest/captcha"
[[override]]
name = "github.com/fatih/structs"
version = "1.0.0"
[[constraint]]
branch = "master"
name = "github.com/jpillora/overseer"
[[constraint]]
name = "github.com/revel/config"
version = "0.19.0"
[[constraint]]
name = "github.com/revel/modules"
version = "0.19.0"
[[constraint]]
name = "github.com/revel/revel"
version = "0.19.0"
[[constraint]]
branch = "master"
name = "github.com/shaoshing/train"
[[constraint]]
branch = "master"
name = "golang.org/x/crypto"
[[constraint]]
name = "gopkg.in/AlecAivazis/survey.v1"
version = "1.4.1"
[[constraint]]
branch = "master"
name = "gopkg.in/ganggo/federation.v0"
[[constraint]]
name = "gopkg.in/ganggo/gorm.v2"
version = "2.0.0"
[[override]]
name = "github.com/xeonx/timeago"
branch = "master"
[[override]]
name = "github.com/revel/log15"
branch = "master"
[[override]]
name = "github.com/revel/cron"
version = "0.19.0"
......@@ -3,11 +3,7 @@
SHELL=/bin/bash
version := $(shell echo -n $(VERSION) |cut -d- -f1)
ifndef version
$(error "Please define a version you want to build e.g. VERSION=v0 make")
endif
package := gopkg.in/ganggo/ganggo.$(version)
package := github.com/ganggo/ganggo
srcdir := $(GOPATH)/src/$(package)
go := $(shell command -v go 2> /dev/null)
......@@ -16,6 +12,10 @@ npm := $(shell command -v npm 2> /dev/null)
revel := $(shell command -v revel 2> /dev/null)
train := $(shell command -v train 2> /dev/null)
define version_info
Please define a version you want to build e.g. VERSION=v0 make
endef
define install_deps_info
is not available please run 'make install-deps'
endef
......@@ -41,12 +41,14 @@ ifndef npm
$(error "npm is not available please install it first!")
endif
# Install CSS and Javascript dependencies
npm install --prefix .
cd $(srcdir) && npm install --prefix .
# GangGo dependencies
go get -d \
./... \
gopkg.in/ganggo/api.$(version)/... \
gopkg.in/ganggo/federation.$(version)/...
go get -u github.com/golang/dep/cmd/dep
cd $(srcdir) && dep ensure
# XXX this seams to be a bug in revel
# it cannot find the api module within
# the vendor directory even though it exists
go get -d gopkg.in/ganggo/api.v0/...
## CLI for train asset library / revel webframework
go get -d \
github.com/shaoshing/train \
......@@ -76,11 +78,14 @@ endif
done
compile:
ifndef version
$(error $(version_info))
endif
ifndef revel
$(error "revel $(install_deps_info)")
endif
cp $(srcdir)/conf/app.conf.example $(srcdir)/conf/app.conf
revel package $(package)
cd $(srcdir) && APP_VERSION=$(version) revel package $(package)
test:
go tool vet -v -all app/
......@@ -88,13 +93,24 @@ ifndef revel
$(error "revel $(install_deps_info)")
endif
cp $(srcdir)/conf/app.conf.example $(srcdir)/conf/app.conf
revel test $(package)
# XXX revel will not print error stacks to console
# (see https://github.com/revel/cmd/issues/121)
revel test $(package) travis || { \
cd $(srcdir) && bash tests/scripts/test_results.sh ;\
exit 1 ;\
}
u2d-wrapper:
ifndef version
$(error $(version_info))
endif
ifndef gobin
$(error "go-bindata $(install_deps_info)")
endif
mkdir tmp && tar -x -f "ganggo.$(version).tar.gz" -C tmp
cd tmp && mv ganggo.$(version)* ganggo && \
mkdir -p $(srcdir)/tmp && cd $(srcdir)/tmp && \
tar -x -f "../ganggo.tar.gz" && \
rm -rf src/$(package)/{vendor,node_modules} && \
go-bindata -o ../bindata.go ganggo src/...
go build -ldflags "-X main.version=$(version)" -o updater updater.go bindata.go
cd $(srcdir) && go build \
-ldflags "-X main.version=$(version)" \
-o updater updater.go bindata.go
......@@ -236,3 +236,21 @@ log.error.flags = 3
# Example:
# log.request.output = %(app.name)s-request.log
log.request.output = off
################################################################################
# Section: travis
# This section is dedicated to the continuous integration service only
[travis]
mode.dev = true
results.pretty = true
watch = false
module.testrunner = github.com/revel/modules/testrunner
log.trace.output = log/%(app.name)s-travis.log
log.info.output = log/%(app.name)s-travis.log
log.warn.output = log/%(app.name)s-travis.log
log.error.output = log/%(app.name)s-travis.log
log.trace.flags = 19
log.info.flags = 19
log.warn.flags = 19
log.error.flags = 19
log.request.output = log/%(app.name)s-travis.log
......@@ -23,16 +23,8 @@ type AppTest struct {
testing.TestSuite
}
func (t *AppTest) Before() {
println("Set up")
}
func (t *AppTest) TestThatIndexPageWorks() {
t.Get("/")
t.AssertOk()
t.AssertContentType("text/html; charset=utf-8")
}
func (t *AppTest) After() {
println("Tear down")
}
......@@ -22,19 +22,9 @@ import (
"encoding/json"
"github.com/revel/revel/testing"
"gopkg.in/ganggo/ganggo.v0/app/models"
"gopkg.in/ganggo/gorm.v2"
_ "gopkg.in/ganggo/gorm.v2/dialects/postgres"
"os"
"fmt"
"time"
)
var userRelations bool = false
var ciDatabases = [2]string{"d1", "d2"}
const (
federation_timeout = 15 * time.Second
username = "ganggo"
handle = username + "@localhost:9000"
password = "pppppp"
......@@ -44,76 +34,70 @@ type TokenJSON struct {
Token string `json:"token"`
}
type FederationSuite struct {
type GnggTestSuite struct {
testing.TestSuite
}
func (t* FederationSuite) DB(databaseName string) (*gorm.DB, error) {
url := fmt.Sprintf("user=postgres dbname=%s sslmode=disable", databaseName)
db, err := gorm.Open("postgres", url)
if err != nil {
return db, err
func (t *GnggTestSuite) ClearDB() {
// re-create ganggo database
db, err := models.OpenDatabase()
t.Assertf(err == nil, "Expected nil, got '%+v'", err)
defer db.Close()
tables := []interface{}{
models.Aspect{},
models.AspectMembership{},
models.AspectVisibility{},
models.Comment{},
models.CommentSignature{},
models.Contact{},
models.Like{},
models.LikeSignature{},
models.Notification{},
models.OAuthToken{},
models.Person{},
models.Photo{},
models.Pod{},
models.Post{},
models.Profile{},
models.Session{},
models.Shareable{},
models.SignatureOrder{},
models.Tag{},
models.ShareableTagging{},
models.UserTagging{},
models.User{},
models.UserStream{},
}
return db, err
}
func (t *FederationSuite) SetupUserRelations() error {
if userRelations { return nil }
t.CreateUser()
if t.CI() {
var (
alice models.Person
bob models.Person
aspect models.Aspect
)
values := url.Values{}
// search for alice
values.Set("handle", "d1@localhost:3000")
result := t.POST("/api/v0/search", values)
err := json.Unmarshal(result, &alice)
if err != nil {
return err
}
values = url.Values{}
// search for bob
values.Set("handle", "d2@localhost:3001")
result = t.POST("/api/v0/search", values)
err = json.Unmarshal(result, &bob)
if err != nil {
return err
}
values = url.Values{}
// create an aspect
values.Set("aspect_name", "testsuite")
result = t.POST("/api/v0/aspects", values)
err = json.Unmarshal(result, &aspect)
if err != nil {
return err
}
// add both to the same aspect
t.POST(fmt.Sprintf(
"/api/v0/people/%d/aspects/%d", alice.ID, aspect.ID,
), url.Values{})
t.POST(fmt.Sprintf(
"/api/v0/people/%d/aspects/%d", bob.ID, aspect.ID,
), url.Values{})
for i, table := range tables {
err = db.Unscoped().Delete(table).Error
t.Assertf(err == nil, "#%d: Expected nil, got '%+v'", i, err)
}
userRelations = true
return nil
}
func (t *FederationSuite) CreateUser() {
func (t *GnggTestSuite) CreateUser() {
values := url.Values{}
values.Set("username", username)
values.Set("password", password)
values.Set("confirm", password)
t.PostForm("/users/sign_up", values)
t.AssertOk()
}
func (t *FederationSuite) AccessToken() string {
func (t *GnggTestSuite) UserID(token string) uint {
db, err := models.OpenDatabase()
t.Assertf(err == nil, "Expected nil, got '%+v'", err)
defer db.Close()
var oauth = models.OAuthToken{}
err = db.Where("token = ?", token).Find(&oauth).Error
t.Assertf(err == nil, "Expected nil, got '%+v'", err)
return oauth.UserID
}
func (t *GnggTestSuite) AccessToken() string {
values := url.Values{}
values.Set("username", username)
values.Set("password", password)
......@@ -124,26 +108,20 @@ func (t *FederationSuite) AccessToken() string {
var token TokenJSON
err := json.Unmarshal(t.ResponseBody, &token)
if err != nil {
panic("Cannot unmarshal api token: " + err.Error())
}
t.Assertf(err == nil, "Expected nil, got '%+v'", err)
return token.Token
}
func (t *FederationSuite) POST(path string, values url.Values) []byte {
func (t *GnggTestSuite) POST(path string, values url.Values) []byte {
req := t.PostFormCustom(t.BaseUrl() + path, values)
req.Header.Set("access_token", t.AccessToken())
req.Send()
return t.ResponseBody
}
func (t *FederationSuite) GET(path string) []byte {