Skip to content
Snippets Groups Projects
Commit d919f85c authored by Niall Sheridan's avatar Niall Sheridan
Browse files

remove calls to t.Parallel()

parent 30802e07
Branches
Tags
No related merge requests found
...@@ -19,7 +19,6 @@ import ( ...@@ -19,7 +19,6 @@ import (
) )
func TestLoadCert(t *testing.T) { func TestLoadCert(t *testing.T) {
t.Parallel()
priv, _ := ssh.ParseRawPrivateKey(testdata.Priv) priv, _ := ssh.ParseRawPrivateKey(testdata.Priv)
key := priv.(*rsa.PrivateKey) key := priv.(*rsa.PrivateKey)
pub, _ := ssh.NewPublicKey(&key.PublicKey) pub, _ := ssh.NewPublicKey(&key.PublicKey)
...@@ -59,7 +58,6 @@ func TestLoadCert(t *testing.T) { ...@@ -59,7 +58,6 @@ func TestLoadCert(t *testing.T) {
} }
func TestSignGood(t *testing.T) { func TestSignGood(t *testing.T) {
t.Parallel()
res := &lib.SignResponse{ res := &lib.SignResponse{
Status: "ok", Status: "ok",
Response: string(testdata.Cert), Response: string(testdata.Cert),
...@@ -88,7 +86,6 @@ func TestSignGood(t *testing.T) { ...@@ -88,7 +86,6 @@ func TestSignGood(t *testing.T) {
} }
func TestSignBad(t *testing.T) { func TestSignBad(t *testing.T) {
t.Parallel()
res := &lib.SignResponse{ res := &lib.SignResponse{
Status: "error", Status: "error",
Response: `{"response": "error"}`, Response: `{"response": "error"}`,
......
...@@ -9,7 +9,6 @@ import ( ...@@ -9,7 +9,6 @@ import (
) )
func TestGetPublicKey(t *testing.T) { func TestGetPublicKey(t *testing.T) {
t.Parallel()
c, _, _, _, _ := ssh.ParseAuthorizedKey(testdata.Cert) c, _, _, _, _ := ssh.ParseAuthorizedKey(testdata.Cert)
if !reflect.DeepEqual(GetPublicKey(c.(*ssh.Certificate)), testdata.Cert) { if !reflect.DeepEqual(GetPublicKey(c.(*ssh.Certificate)), testdata.Cert) {
t.Fail() t.Fail()
......
...@@ -49,7 +49,6 @@ func newContext(t *testing.T) *appContext { ...@@ -49,7 +49,6 @@ func newContext(t *testing.T) *appContext {
} }
func TestLoginHandler(t *testing.T) { func TestLoginHandler(t *testing.T) {
t.Parallel()
req, _ := http.NewRequest("GET", "/auth/login", nil) req, _ := http.NewRequest("GET", "/auth/login", nil)
resp := httptest.NewRecorder() resp := httptest.NewRecorder()
loginHandler(newContext(t), resp, req) loginHandler(newContext(t), resp, req)
...@@ -59,7 +58,6 @@ func TestLoginHandler(t *testing.T) { ...@@ -59,7 +58,6 @@ func TestLoginHandler(t *testing.T) {
} }
func TestCallbackHandler(t *testing.T) { func TestCallbackHandler(t *testing.T) {
t.Parallel()
req, _ := http.NewRequest("GET", "/auth/callback", nil) req, _ := http.NewRequest("GET", "/auth/callback", nil)
req.Form = url.Values{"state": []string{"state"}, "code": []string{"abcdef"}} req.Form = url.Values{"state": []string{"state"}, "code": []string{"abcdef"}}
resp := httptest.NewRecorder() resp := httptest.NewRecorder()
...@@ -72,7 +70,6 @@ func TestCallbackHandler(t *testing.T) { ...@@ -72,7 +70,6 @@ func TestCallbackHandler(t *testing.T) {
} }
func TestRootHandler(t *testing.T) { func TestRootHandler(t *testing.T) {
t.Parallel()
req, _ := http.NewRequest("GET", "/", nil) req, _ := http.NewRequest("GET", "/", nil)
resp := httptest.NewRecorder() resp := httptest.NewRecorder()
ctx := newContext(t) ctx := newContext(t)
...@@ -88,7 +85,6 @@ func TestRootHandler(t *testing.T) { ...@@ -88,7 +85,6 @@ func TestRootHandler(t *testing.T) {
} }
func TestRootHandlerNoSession(t *testing.T) { func TestRootHandlerNoSession(t *testing.T) {
t.Parallel()
req, _ := http.NewRequest("GET", "/", nil) req, _ := http.NewRequest("GET", "/", nil)
resp := httptest.NewRecorder() resp := httptest.NewRecorder()
ctx := newContext(t) ctx := newContext(t)
...@@ -99,7 +95,6 @@ func TestRootHandlerNoSession(t *testing.T) { ...@@ -99,7 +95,6 @@ func TestRootHandlerNoSession(t *testing.T) {
} }
func TestSignRevoke(t *testing.T) { func TestSignRevoke(t *testing.T) {
t.Parallel()
s, _ := json.Marshal(&lib.SignRequest{ s, _ := json.Marshal(&lib.SignRequest{
Key: string(testdata.Pub), Key: string(testdata.Pub),
ValidUntil: time.Now().UTC().Add(1 * time.Hour), ValidUntil: time.Now().UTC().Add(1 * time.Hour),
......
...@@ -25,7 +25,6 @@ var ( ...@@ -25,7 +25,6 @@ var (
) )
func TestCert(t *testing.T) { func TestCert(t *testing.T) {
t.Parallel()
r := &lib.SignRequest{ r := &lib.SignRequest{
Key: string(testdata.Pub), Key: string(testdata.Pub),
ValidUntil: time.Now().Add(1 * time.Hour), ValidUntil: time.Now().Add(1 * time.Hour),
...@@ -54,7 +53,6 @@ func TestCert(t *testing.T) { ...@@ -54,7 +53,6 @@ func TestCert(t *testing.T) {
} }
func TestRevocationList(t *testing.T) { func TestRevocationList(t *testing.T) {
t.Parallel()
r := &lib.SignRequest{ r := &lib.SignRequest{
Key: string(testdata.Pub), Key: string(testdata.Pub),
ValidUntil: time.Now().Add(1 * time.Hour), ValidUntil: time.Now().Add(1 * time.Hour),
...@@ -82,7 +80,6 @@ func TestRevocationList(t *testing.T) { ...@@ -82,7 +80,6 @@ func TestRevocationList(t *testing.T) {
} }
func TestPermissions(t *testing.T) { func TestPermissions(t *testing.T) {
t.Parallel()
r := &lib.SignRequest{ r := &lib.SignRequest{
Key: string(testdata.Pub), Key: string(testdata.Pub),
ValidUntil: time.Now().Add(1 * time.Hour), ValidUntil: time.Now().Add(1 * time.Hour),
......
...@@ -20,7 +20,6 @@ import ( ...@@ -20,7 +20,6 @@ import (
) )
func TestParseCertificate(t *testing.T) { func TestParseCertificate(t *testing.T) {
t.Parallel()
a := assert.New(t) a := assert.New(t)
now := uint64(time.Now().Unix()) now := uint64(time.Now().Unix())
r, _ := rsa.GenerateKey(rand.Reader, 1024) r, _ := rsa.GenerateKey(rand.Reader, 1024)
...@@ -104,13 +103,11 @@ func testStore(t *testing.T, db CertStorer) { ...@@ -104,13 +103,11 @@ func testStore(t *testing.T, db CertStorer) {
} }
func TestMemoryStore(t *testing.T) { func TestMemoryStore(t *testing.T) {
t.Parallel()
db := NewMemoryStore() db := NewMemoryStore()
testStore(t, db) testStore(t, db)
} }
func TestMySQLStore(t *testing.T) { func TestMySQLStore(t *testing.T) {
t.Parallel()
if os.Getenv("MYSQL_TEST") == "" { if os.Getenv("MYSQL_TEST") == "" {
t.Skip("No MYSQL_TEST environment variable") t.Skip("No MYSQL_TEST environment variable")
} }
...@@ -133,7 +130,6 @@ func TestMySQLStore(t *testing.T) { ...@@ -133,7 +130,6 @@ func TestMySQLStore(t *testing.T) {
} }
func TestSQLiteStore(t *testing.T) { func TestSQLiteStore(t *testing.T) {
t.Parallel()
f, err := ioutil.TempFile("", "sqlite_test_db") f, err := ioutil.TempFile("", "sqlite_test_db")
if err != nil { if err != nil {
t.Error(err) t.Error(err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment