-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild_test.go
More file actions
43 lines (38 loc) · 1.11 KB
/
Copy pathbuild_test.go
File metadata and controls
43 lines (38 loc) · 1.11 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 buildpkg
import (
"log"
"os"
"path/filepath"
"testing"
qt "github.com/frankban/quicktest"
)
func TestBuild(t *testing.T) {
if os.Getenv("CI") != "" {
t.Skip("Skipping test on CI")
}
c := qt.New(t)
wd, err := os.Getwd()
c.Assert(err, qt.IsNil)
testData := filepath.Join(wd, "testdata")
opts := Options{
Infof: func(format string, args ...any) {
log.Printf(format, args...)
},
Dir: testData,
SigningIdentity: "ZYSJUFSYL4",
SigningEntitlements: []string{"com.apple.security.cs.allow-jit", "com.apple.security.cs.allow-unsigned-executable-memory"},
StagingDirectory: filepath.Join(testData, "staging"),
Identifier: "is.bep.helloworld",
Version: "0.0.13",
InstallLocation: "/usr/local/bin",
PackageOutputFilename: filepath.Join(testData, "helloworld.pkg"),
SkipCodeSigning: false,
SkipNotarization: false,
SkipInstallerSigning: false,
}
builder, err := New(opts)
c.Assert(err, qt.IsNil)
c.Assert(builder.runCommand("./prepare.sh", builder.Version), qt.IsNil)
err = builder.Build()
c.Assert(err, qt.IsNil)
}