Add nodeinfo 2.1.
This commit is contained in:
@ -69,7 +69,7 @@ func TestInvalidConfig(t *testing.T) {
|
||||
|
||||
output := buffer.String()
|
||||
if strings.Split(output, "\n")[0] != "Invalid config given" {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,15 +86,15 @@ func TestListConfig(t *testing.T) {
|
||||
switch strings.Split(row, ":")[0] {
|
||||
case "Blocking for service-type actor ":
|
||||
if strings.Split(row, ":")[1] == " true" {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
case "Manually accept follow-request ":
|
||||
if strings.Split(row, ":")[1] == " true" {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
case "Announce activity instead of relay create activity ":
|
||||
if strings.Split(row, ":")[1] == " true" {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -115,7 +115,7 @@ func TestExportConfig(t *testing.T) {
|
||||
jsonData, err := ioutil.ReadAll(file)
|
||||
output := buffer.String()
|
||||
if strings.Split(output, "\n")[0] != string(jsonData) {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ func TestImportConfig(t *testing.T) {
|
||||
jsonData, err := ioutil.ReadAll(file)
|
||||
output := buffer.String()
|
||||
if strings.Split(output, "\n")[0] != string(jsonData) {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
|
||||
relayState.RedisClient.FlushAll().Result()
|
||||
|
@ -24,7 +24,7 @@ subscription.example.jp
|
||||
Total : 1
|
||||
`
|
||||
if output != valid {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
|
||||
relayState.RedisClient.FlushAll().Result()
|
||||
@ -49,7 +49,7 @@ limitedDomain.example.jp
|
||||
Total : 1
|
||||
`
|
||||
if output != valid {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
|
||||
relayState.RedisClient.FlushAll().Result()
|
||||
@ -74,7 +74,7 @@ blockedDomain.example.jp
|
||||
Total : 1
|
||||
`
|
||||
if output != valid {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
|
||||
relayState.RedisClient.FlushAll().Result()
|
||||
@ -185,7 +185,7 @@ func TestSetDomainInvalid(t *testing.T) {
|
||||
|
||||
output := buffer.String()
|
||||
if strings.Split(output, "\n")[0] != "Invalid type given" {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
|
||||
relayState.RedisClient.FlushAll().Result()
|
||||
@ -230,7 +230,7 @@ func TestInvalidUnfollowDomain(t *testing.T) {
|
||||
|
||||
output := buffer.String()
|
||||
if strings.Split(output, "\n")[0] != "Invalid domain [unknown.tld] given" {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
|
||||
relayState.RedisClient.FlushAll().Result()
|
||||
|
@ -29,7 +29,7 @@ example.com
|
||||
Total : 1
|
||||
`
|
||||
if output != valid {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
|
||||
relayState.RedisClient.FlushAll().Result()
|
||||
@ -103,7 +103,7 @@ func TestInvalidFollow(t *testing.T) {
|
||||
|
||||
output := buffer.String()
|
||||
if strings.Split(output, "\n")[0] != "Invalid domain [unknown.tld] given" {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
|
||||
relayState.RedisClient.FlushAll().Result()
|
||||
@ -121,7 +121,7 @@ func TestInvalidRejectFollow(t *testing.T) {
|
||||
|
||||
output := buffer.String()
|
||||
if strings.Split(output, "\n")[0] != "Invalid domain [unknown.tld] given" {
|
||||
t.Fatalf("Invalid Responce.")
|
||||
t.Fatalf("Invalid Response.")
|
||||
}
|
||||
|
||||
relayState.RedisClient.FlushAll().Result()
|
||||
|
Reference in New Issue
Block a user