-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhelloModule_test.go
More file actions
43 lines (38 loc) · 1.04 KB
/
helloModule_test.go
File metadata and controls
43 lines (38 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package hellomodule
import (
"testing"
. "github.com/warpfork/go-wish"
. "go.polydawn.net/reach/examples/testutil"
)
func Test(t *testing.T) {
if testing.Short() {
t.Skipf("integration test -- not running with 'short' mode")
}
WithCwdClonedTmpDir(GetCwdAbs(), func() {
exitCode, stdout, stderr := RunIntoBuffer("reach", "emerge")
Wish(t, exitCode, ShouldEqual, 0)
Wish(t, stderr, ShouldEqual, Dedent(`
module loaded
module contains 1 steps
module evaluation plan order:
- 01: main
imports pinned to hashes:
- "base": tar:6q7G4hWr283FpTa5Lf8heVqw9t97b5VoMU6AGszuBYAz9EzQdeHVFAou7c4W9vFcQ6
module eval complete.
module exports:
`))
Wish(t, stdout, ShouldEqual, Dedent(`
{
"wowslot": "tar:89LoLzgAYkndYpNQC7H94eR6tU6F4EWy2yFGouDCQz1cx9JpYmEPyDm2YWwYTGDvPv"
}
`))
})
}
func TestLint(t *testing.T) {
exitCode, stdout, stderr := RunIntoBuffer("reach", "catalog", "lint")
Wish(t, exitCode, ShouldEqual, 0)
Wish(t, stdout, ShouldEqual, "")
Wish(t, stderr, ShouldEqual, Dedent(`
0 total warnings
`))
}