Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamgilbert committed Jul 11, 2024
1 parent 383a837 commit 2736ee8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
9 changes: 8 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
load("@bazel_gazelle//:def.bzl", "gazelle")
# load(":rules.bzl", "foo_binary")

Expand Down Expand Up @@ -103,3 +103,10 @@ go_binary(
goos = "linux",
visibility = ["//visibility:public"],
)

go_test(
name = "osquery-extension_test",
srcs = ["main_test.go"],
embed = [":osquery-extension_lib"],
deps = ["@com_github_stretchr_testify//assert"],
)
12 changes: 12 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package main

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestVersionIsValid(t *testing.T) {
assert.NotEmpty(t, Version)
assert.NotEqual(t, "0", Version)
}
1 change: 1 addition & 0 deletions tables/sofa/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestDownloadFile(t *testing.T) {
client, err := NewSofaClient(
WithURL(server.URL),
WithCacheDir(cwd),
WithUserAgent("test"),
)

assert.NoError(t, err)
Expand Down

0 comments on commit 2736ee8

Please sign in to comment.