platform9 / cctl

Apache License 2.0
47 stars 8 forks source link

Test github.com/platform9/cctl/pkg/state/v0.TestPullFromAPIs sometimes fails #139

Open dlipovetsky opened 6 years ago

dlipovetsky commented 6 years ago
[11:38:21][Step 1/1] docker run --rm -e VERSION_OVERRIDE= -v /home/pf9/BuildAgent/work/c2cae60ab8e029fe/cctl:/go/src/github.com/platform9/cctl -v /home/pf9/BuildAgent/system/git/git-A91E5A9B.git:/home/pf9/BuildAgent/system/git/git-A91E5A9B.git -w /go/src/github.com/platform9/cctl golang:1.10 make
[11:38:27][Step 1/1] go test -v ./...
[11:40:01][Step 1/1] ?      github.com/platform9/cctl   [no test files]
[11:40:02][Step 1/1] ?      github.com/platform9/cctl/cmd   [no test files]
[11:40:02][Step 1/1] ?      github.com/platform9/cctl/common    [no test files]
[11:40:23][Step 1/1] === RUN   TestStateV1FromStateV0
[11:40:23][Step 1/1] --- PASS: TestStateV1FromStateV0 (0.07s)
[11:40:23][Step 1/1] === RUN   TestStateV2FromStateV1
[11:40:23][Step 1/1] --- PASS: TestStateV2FromStateV1 (0.05s)
[11:40:23][Step 1/1] === RUN   TestVersion
[11:40:23][Step 1/1] === RUN   TestVersion/v0
[11:40:23][Step 1/1] === RUN   TestVersion/v1
[11:40:23][Step 1/1] === RUN   TestVersion/v2
[11:40:23][Step 1/1] --- PASS: TestVersion (0.04s)
[11:40:23][Step 1/1]     --- PASS: TestVersion/v0 (0.00s)
[11:40:23][Step 1/1]     --- PASS: TestVersion/v1 (0.01s)
[11:40:23][Step 1/1]     --- PASS: TestVersion/v2 (0.03s)
[11:40:23][Step 1/1] PASS
[11:40:23][Step 1/1] ok     github.com/platform9/cctl/pkg/state/util    1.218s
[11:40:23][Step 1/1] === RUN   TestPullFromAPIs
[11:40:23][Step 1/1] --- FAIL: TestPullFromAPIs (0.04s)
[11:40:23][Step 1/1]    state_test.go:104: unable to unmarshal state from YAML: error converting YAML to JSON: yaml: line 66: could not find expected ':'
[11:40:23][Step 1/1] FAIL
[11:40:23][Step 1/1] FAIL   github.com/platform9/cctl/pkg/state/v0  0.877s
[11:40:23][Step 1/1] === RUN   TestPullFromAPIs
[11:40:23][Step 1/1] --- PASS: TestPullFromAPIs (0.01s)
[11:40:23][Step 1/1] PASS
[11:40:23][Step 1/1] ok     github.com/platform9/cctl/pkg/state/v1  1.090s
[11:40:35][Step 1/1] === RUN   TestPullFromAPIs
[11:40:35][Step 1/1] --- PASS: TestPullFromAPIs (0.02s)
[11:40:35][Step 1/1] PASS
[11:40:35][Step 1/1] ok     github.com/platform9/cctl/pkg/state/v2  0.256s
[11:40:35][Step 1/1] ?      github.com/platform9/cctl/pkg/util/archive  [no test files]
[11:40:35][Step 1/1] ?      github.com/platform9/cctl/pkg/util/clusterapi   [no test files]
[11:40:35][Step 1/1] ?      github.com/platform9/cctl/pkg/util/ssh  [no test files]
[11:40:35][Step 1/1] === RUN   TestCompareMajorMinorVersions
[11:40:35][Step 1/1] --- PASS: TestCompareMajorMinorVersions (0.00s)
[11:40:35][Step 1/1] PASS
[11:40:35][Step 1/1] ok     github.com/platform9/cctl/semverutil    0.018s
[11:40:35][Step 1/1] Makefile:64: recipe for target 'test' failed
dlipovetsky commented 6 years ago

I suspect the go version of the golang:1.10 docker image on specific builders. On the builders where this test sometimes fails, the version is 1.10.2, but on one where it has never failed, the version is 1.10.4.

[daniel@teamcity-builder24 ~]$ sudo docker run --rm golang:1.10 go version
go version go1.10.2 linux/amd64
[daniel@teamcity-builder-esx8-03 ~]$ sudo docker run --rm golang:1.10 go version
go version go1.10.4 linux/amd64