package main import "testing" var config = ` url: go.uber.org packages: thriftrw: repo: github.com/thriftrw/thriftrw-go yarpc: repo: github.com/yarpc/yarpc-go ` func TestIndex(t *testing.T) { rr := CallAndRecord(t, config, "/") AssertResponse(t, rr, 200, ` `) } func TestPackageShouldExist(t *testing.T) { rr := CallAndRecord(t, config, "/yarpc") AssertResponse(t, rr, 200, ` Nothing to see here. Please move along. `) } func TestNonExistentPackageShould404(t *testing.T) { rr := CallAndRecord(t, config, "/nonexistent") AssertResponse(t, rr, 404, ` 404 page not found `) } func TestTrailingSlash(t *testing.T) { rr := CallAndRecord(t, config, "/yarpc/") AssertResponse(t, rr, 200, ` Nothing to see here. Please move along. `) } func TestDeepImports(t *testing.T) { rr := CallAndRecord(t, config, "/yarpc/heeheehee") AssertResponse(t, rr, 200, ` Nothing to see here. Please move along. `) rr = CallAndRecord(t, config, "/yarpc/heehee/hawhaw") AssertResponse(t, rr, 200, ` Nothing to see here. Please move along. `) }