(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestSearchEngine_SaveDoc(t *testing.T) { |
| 50 | operator, err := NewOperator(testEndpoints, testUsername, testPassword) |
| 51 | if err != nil { |
| 52 | t.Fatal(err) |
| 53 | } |
| 54 | err = operator.SaveDoc(context.Background(), testIndex, "1", &AnswerPostDoc{ |
| 55 | Id: "10010000000001587", |
| 56 | ObjectID: "10010000000001587", |
| 57 | Title: "How to build new answer with plugin?", |
| 58 | Type: "question", |
| 59 | Content: "I need to build new answer with plugin, but I don't know how to do it.", |
| 60 | UserID: "10040000000000198", |
| 61 | QuestionID: "10010000000001587", |
| 62 | Answers: 5, |
| 63 | Status: 1, |
| 64 | Views: 156, |
| 65 | Created: 1687909352, |
| 66 | Active: 1, |
| 67 | Score: 2, |
| 68 | HasAccepted: false, |
| 69 | Tags: []string{"go", "js"}, |
| 70 | }) |
| 71 | if err != nil { |
| 72 | t.Fatal(err) |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | func TestSearchEngine_QueryDoc(t *testing.T) { |
| 77 | operator, err := NewOperator(testEndpoints, testUsername, testPassword) |
nothing calls this directly
no test coverage detected