-
Notifications
You must be signed in to change notification settings - Fork 5
/
get_deps_test.go
44 lines (41 loc) · 1.05 KB
/
get_deps_test.go
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
44
package main
import (
"os"
"testing"
)
func TestParseVanagonOutputNix(t *testing.T) {
dat, err := os.ReadFile("testfiles/pxp-agent_el-8-x86_64.json")
if err != nil {
t.Errorf("Couldn't read test file")
}
contentString := string(dat)
gems, err := parseVanagonOutput(contentString, "foo", "bar")
if err != nil {
t.Fatalf("Error parsing vanagon string. Err: %s", err)
}
a := gems
_ = a
defer os.RemoveAll(LOCKFILE_DIR)
_, err = buildGemFile("foo", "bar", &gems)
if err != nil {
t.Fatalf("Error creating gemfile. Err: %s", err)
}
}
func TestParseVanagonOutputWin(t *testing.T) {
dat, err := os.ReadFile("testfiles/pxp-agent_windowsfips-2012r2-x64.json")
if err != nil {
t.Errorf("Couldn't read test file")
}
contentString := string(dat)
gems, err := parseVanagonOutput(contentString, "foo", "bar")
if err != nil {
t.Fatalf("Error parsing vanagon string. Err: %s", err)
}
a := gems
_ = a
defer os.RemoveAll(LOCKFILE_DIR)
_, err = buildGemFile("foo", "bar", &gems)
if err != nil {
t.Fatalf("Error creating gemfile. Err: %s", err)
}
}