check "gopkg.in/check.v1"
)
-var forceLegacyAPI14 bool
-
// Gocheck boilerplate
func Test(t *testing.T) {
- for _, forceLegacyAPI14 = range []bool{false, true} {
- check.TestingT(t)
- }
+ check.TestingT(t)
}
var _ = check.Suite(&HandlerSuite{})
s.ctx, s.cancel = context.WithCancel(context.Background())
s.ctx = ctxlog.Context(s.ctx, ctxlog.New(os.Stderr, "json", "debug"))
s.cluster = &arvados.Cluster{
- ClusterID: "zzzzz",
- PostgreSQL: integrationTestCluster().PostgreSQL,
- ForceLegacyAPI14: forceLegacyAPI14,
+ ClusterID: "zzzzz",
+ PostgreSQL: integrationTestCluster().PostgreSQL,
}
s.cluster.API.RequestTimeout = arvados.Duration(5 * time.Minute)
s.cluster.TLS.Insecure = true
}
func (s *HandlerSuite) TestLogoutGoogle(c *check.C) {
- if s.cluster.ForceLegacyAPI14 {
- // Google login N/A
- return
- }
s.cluster.Login.Google.Enable = true
s.cluster.Login.Google.ClientID = "test"
req := httptest.NewRequest("GET", "https://0.0.0.0:1/logout?return_to=https://example.com/foo", nil)
}
resp2, err := client.Get(s.cluster.Services.RailsAPI.ExternalURL.String() + url + "/?api_token=" + token)
c.Check(err, check.Equals, nil)
+ c.Assert(resp2.StatusCode, check.Equals, http.StatusOK,
+ check.Commentf("Wasn't able to get data from the RailsAPI at %q", url))
defer resp2.Body.Close()
db, err := ioutil.ReadAll(resp2.Body)
c.Check(err, check.Equals, nil)