Skip to content

Commit 08bcf37

Browse files
committed
Fix testdata paths
1 parent 2bf7e0f commit 08bcf37

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

pkg/deps/deps_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func TestWithDetection_NonFileType(t *testing.T) {
124124
h := opt(func(_ context.Context, hh []heartbeat.Heartbeat) ([]heartbeat.Result, error) {
125125
assert.Equal(t, []heartbeat.Heartbeat{
126126
{
127-
Entity: "testdata/codefiles/golang.go",
127+
Entity: "testdata/golang.go",
128128
EntityType: heartbeat.AppType,
129129
},
130130
}, hh)
@@ -137,7 +137,7 @@ func TestWithDetection_NonFileType(t *testing.T) {
137137
})
138138

139139
result, err := h(context.Background(), []heartbeat.Heartbeat{{
140-
Entity: "testdata/codefiles/golang.go",
140+
Entity: "testdata/golang.go",
141141
EntityType: heartbeat.AppType,
142142
}})
143143
require.NoError(t, err)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package main
2+
3+
// list every possible way of importing to try and break dependency detection
4+
// http://learngowith.me/alternate-ways-of-importing-packages/
5+
6+
import "fmt"
7+
import "compress/gzip"
8+
import "github.com/golang/example/stringutil"
9+
import (
10+
"log"
11+
"os"
12+
)
13+
import newname "oldname"
14+
import . "direct"
15+
import _ "suppress"
16+
import (
17+
"foobar"
18+
_ "image/gif"
19+
. "math"
20+
)
21+
22+
func main() {
23+
fmt.Println("Hello, World!")
24+
}

0 commit comments

Comments
 (0)