Skip to content

Commit

Permalink
fix the test
Browse files Browse the repository at this point in the history
  • Loading branch information
kkdai committed May 22, 2021
1 parent 0dab80d commit 79f37dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import (
func TestPostGithubIssue(t *testing.T) {
token := os.Getenv("Token")
user := os.Getenv("User")
repo := os.Getenv("Repos")
repo := os.Getenv("Repo")

if len(token) == 0 || len(user) == 0 || len(user) == 0 {
t.Skip("Please input github env")
return
}

i := NewIssue(Article{Title: "test", Link: "https://sss.ccc/path1/"})
Expand Down
9 changes: 6 additions & 3 deletions disqus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/xml"
"fmt"
"io/ioutil"
"log"
"os"
"testing"
)
Expand Down Expand Up @@ -110,7 +109,11 @@ func TestPrepareData(t *testing.T) {
t.Error("err:", err)
}

for k, v := range disqus.impData {
log.Println("title:", k, " data:", v.Comments)
if len(disqus.impData) != 2 {
t.Error("PrepareImportData article count error!")
}

if len(disqus.impData["002/"].Comments) != 2 {
t.Error("PrepareImportData comment count error!")
}
}

0 comments on commit 79f37dd

Please sign in to comment.