Skip to content

Commit

Permalink
Add mgo patches for mongo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeckman314 committed Jul 6, 2023
1 parent 651a132 commit cc44fb0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ jobs:
uses: actions/download-artifact@v2
with:
name: funnelBin
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: MongoTest
run: |
chmod +x funnel
Expand Down
3 changes: 3 additions & 0 deletions database/mongodb/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import (

// WriteEvent creates an event for the server to handle.
func (db *MongoDB) WriteEvent(ctx context.Context, req *events.Event) error {
if !db.active {
return fmt.Errorf("database is not active")
}
sess := db.sess.Copy()
defer sess.Close()
tasks := db.tasks(sess)
Expand Down
4 changes: 2 additions & 2 deletions tes/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ func (c *Client) CancelTask(ctx context.Context, req *CancelTaskRequest) (*Cance
return resp, nil
}

// GetServiceInfo returns result of GET /v1/tasks/service-info
// GetServiceInfo returns result of GET /v1/service-info
func (c *Client) GetServiceInfo(ctx context.Context, req *GetServiceInfoRequest) (*ServiceInfo, error) {
u := c.address + "/v1/tasks/service-info"
u := c.address + "/v1/service-info"
hreq, _ := http.NewRequest("GET", u, nil)
// hreq.WithContext(ctx)
hreq.SetBasicAuth(c.User, c.Password)
Expand Down

0 comments on commit cc44fb0

Please sign in to comment.