login_test.go:109:
c.Assert(err, check.IsNil)
... value *os.PathError = &os.PathError{Op:"chown", Path:"/tmp/check-6501085192752421740/168/json.wYtR60S5LGn3", Err:0x1} ("chown /tmp/check-6501085192752421740/168/json.wYtR60S5LGn3: operation not permitted")
OOPS: 76 passed, 4 FAILED
--- FAIL: Test (0.19s)
FAIL
exit status 1
FAIL github.com/snapcore/snapd/client 0.240s
Notes:
- this fails with both the lxd from the archive and the lxd snap
- using 'lxc config set sd security.privileged true' and restarting the container makes no difference
On an Ubuntu 16.04 system:
$ sudo apt-get install lxd (this gets lxd 2.0.5) PATH:$GOPATH/ bin" com/snapcore/ snapd/. .. com/kardianos/ govendor src/github. com/snapcore/ snapd com/snapcore/ snapd/. .. && go test -v github. com/snapcore/ snapd/client TestClientLogin
$ newgrp lxd
$ lxc init
$ sudo lxd init (accept all defaults)
$ lxc launch ubuntu:16.04 sd
$ lxc exec sd -- sudo -H -u ubuntu -i sh -c 'script /dev/null'
$ apt-get install git golang
$ export GOPATH=${HOME}/work
$ mkdir $GOPATH
$ export PATH="$
$ go get -d -v github.
$ go get -u github.
$ cd $GOPATH/
$ govendor sync
$ go build -v github.
...
FAIL: login_test.go:34: clientSuite.
login_test.go:47: errorString{ s:"cannot persist login information: chown /tmp/check- 650108519275242 1740/83/ json.qh6N5jVqT6 JT: operation not permitted"} ("cannot persist login information: chown /tmp/check- 650108519275242 1740/83/ json.qh6N5jVqT6 JT: operation not permitted")
c.Check(err, check.IsNil)
... value *errors.errorString = &errors.
login_test.go:51: macaroon" , "discharge- macaroon" }}) "the-user- name", Email:"", Macaroon: "the-root- macaroon" , Discharges: []string{ "discharge- macaroon" }}
c.Check(user, check.DeepEquals, &client.User{
Username: "the-user-name",
Macaroon: "the-root-
Discharges: []string{
... obtained *client.User = (*client.User)(nil)
... expected *client.User = &client.User{ID:0, Username:
login_test.go:53: cs.cli. LoggedIn( ), check.Equals, true)
c.Assert(
... obtained bool = false
... expected bool = true
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- TestClientSetsA uthorization
FAIL: client_test.go:137: clientSuite.
client_test.go:146: Op:"chown" , Path:"/ tmp/check- 650108519275242 1740/136/ json.pbd1CK99CX s6", Err:0x1} ("chown /tmp/check- 650108519275242 1740/136/ json.pbd1CK99CX s6: operation not permitted")
c.Assert(err, IsNil)
... value *os.PathError = &os.PathError{
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- TestReadAuthDat a
FAIL: login_test.go:117: clientSuite.
login_test.go:127: Op:"chown" , Path:"/ tmp/check- 650108519275242 1740/157/ json.hswY3ThgFL KC", Err:0x1} ("chown /tmp/check- 650108519275242 1740/157/ json.hswY3ThgFL KC: operation not permitted")
c.Assert(err, check.IsNil)
... value *os.PathError = &os.PathError{
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- TestWriteAuthDa ta
FAIL: login_test.go:99: clientSuite.
login_test.go:109: Op:"chown" , Path:"/ tmp/check- 650108519275242 1740/168/ json.wYtR60S5LG n3", Err:0x1} ("chown /tmp/check- 650108519275242 1740/168/ json.wYtR60S5LG n3: operation not permitted")
c.Assert(err, check.IsNil)
... value *os.PathError = &os.PathError{
OOPS: 76 passed, 4 FAILED com/snapcore/ snapd/client 0.240s
--- FAIL: Test (0.19s)
FAIL
exit status 1
FAIL github.
Notes:
- this fails with both the lxd from the archive and the lxd snap
- using 'lxc config set sd security.privileged true' and restarting the container makes no difference