Skip to content

Commit

Permalink
chore(test): Better error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
vlastahajek committed Mar 24, 2021
1 parent 2c01ee8 commit 7f61a1a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/delete_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestDeleteAPI(t *testing.T) {
map[string]interface{}{"f": f, "i": i},
tm)
err := writeAPI.WritePoint(ctx, p)
require.Nil(t, err, err)
require.NoError(t, err)
f += 1.2
tm = tm.Add(time.Minute)
}
Expand Down
2 changes: 1 addition & 1 deletion api/users_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func TestSignInOut(t *testing.T) {

// try authorized calls
err = client.WriteAPIBlocking("my-org", "my-bucket").WriteRecord(ctx, "test,a=rock,b=local f=1.2,i=-5i")
assert.Nil(t, err)
assert.NoError(t, err)

res, err := client.QueryAPI("my-org").QueryRaw(context.Background(), `from(bucket:"my-bucket")|> range(start: -24h) |> filter(fn: (r) => r._measurement == "test")`, influxdb2.DefaultDialect())
assert.Nil(t, err)
Expand Down
6 changes: 3 additions & 3 deletions client_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func TestWrite(t *testing.T) {

err := client.WriteAPIBlocking("my-org", "my-bucket").WritePoint(context.Background(), influxdb2.NewPointWithMeasurement("test").
AddTag("a", "3").AddField("i", 20).AddField("f", 4.4))
assert.Nil(t, err)
assert.NoError(t, err)

client.Close()
wg.Wait()
Expand Down Expand Up @@ -203,7 +203,7 @@ func TestWriteV1Compatibility(t *testing.T) {

err := client.WriteAPIBlocking("", "mydb/autogen").WritePoint(context.Background(), influxdb2.NewPointWithMeasurement("testv1").
AddTag("a", "3").AddField("i", 20).AddField("f", 4.4))
assert.Nil(t, err)
assert.NoError(t, err)

client.Close()
wg.Wait()
Expand Down Expand Up @@ -273,7 +273,7 @@ func TestHTTPService(t *testing.T) {
org, err := client.OrganizationsAPI().FindOrganizationByName(context.Background(), "my-org")
if err != nil {
//return err
t.Error(err)
t.Fatal(err)
}
taskDescription := "Example task"
taskFlux := `option task = {
Expand Down

0 comments on commit 7f61a1a

Please sign in to comment.