mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-14 07:19:02 +00:00
More work on project permissions
This commit is contained in:
@@ -18,7 +18,7 @@ func TestTraceValid(t *testing.T) {
|
||||
Scope: "test",
|
||||
Message: "This is a test message",
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}, w)
|
||||
}, w, nil)
|
||||
|
||||
if r.StatusCode != 200 {
|
||||
t.Fail()
|
||||
@@ -30,7 +30,7 @@ func TestTraceInvalidScope(t *testing.T) {
|
||||
r := Post("/log/trace", api.LogRequest{
|
||||
Message: "this is a test message",
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}, w)
|
||||
}, w, nil)
|
||||
|
||||
if r.StatusCode == 200 {
|
||||
t.Error()
|
||||
@@ -40,7 +40,7 @@ func TestTraceInvalidScope(t *testing.T) {
|
||||
Scope: "",
|
||||
Message: "this is a test message",
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}, w)
|
||||
}, w, nil)
|
||||
|
||||
if r.StatusCode == 200 {
|
||||
t.Error()
|
||||
@@ -56,7 +56,7 @@ func TestTraceInvalidMessage(t *testing.T) {
|
||||
Scope: "test",
|
||||
Message: "",
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}, w)
|
||||
}, w, nil)
|
||||
|
||||
if r.StatusCode == 200 {
|
||||
t.Error()
|
||||
@@ -71,7 +71,7 @@ func TestTraceInvalidTime(t *testing.T) {
|
||||
r := Post("/log/trace", api.LogRequest{
|
||||
Scope: "test",
|
||||
Message: "test",
|
||||
}, w)
|
||||
}, w, nil)
|
||||
if r.StatusCode == 200 {
|
||||
t.Error()
|
||||
}
|
||||
@@ -87,7 +87,7 @@ func TestWarnValid(t *testing.T) {
|
||||
Scope: "test",
|
||||
Message: "test",
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}, w)
|
||||
}, w, nil)
|
||||
if r.StatusCode != 200 {
|
||||
t.Fail()
|
||||
}
|
||||
@@ -100,7 +100,7 @@ func TestInfoValid(t *testing.T) {
|
||||
Scope: "test",
|
||||
Message: "test",
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}, w)
|
||||
}, w, nil)
|
||||
if r.StatusCode != 200 {
|
||||
t.Fail()
|
||||
}
|
||||
@@ -113,7 +113,7 @@ func TestErrorValid(t *testing.T) {
|
||||
Scope: "test",
|
||||
Message: "test",
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}, w)
|
||||
}, w, nil)
|
||||
if r.StatusCode != 200 {
|
||||
t.Fail()
|
||||
}
|
||||
@@ -179,7 +179,7 @@ func getLogs(since int64, level storage.LogLevel) *api.GetLogResponse {
|
||||
r := Post(fmt.Sprintf("/logs"), api.GetLogRequest{
|
||||
Since: since,
|
||||
Level: level,
|
||||
}, nil)
|
||||
}, nil, nil)
|
||||
|
||||
resp := &api.GetLogResponse{}
|
||||
data, _ := ioutil.ReadAll(r.Body)
|
||||
|
||||
Reference in New Issue
Block a user