/usr/share/gocode/src/github.com/mitchellh/multistep/statebag_test.go is in golang-github-mitchellh-multistep-dev 0.0~git20140407.0.162146f-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | package multistep
import (
"testing"
)
func TestBasicStateBag_ImplRunner(t *testing.T) {
var raw interface{}
raw = &BasicStateBag{}
if _, ok := raw.(StateBag); !ok {
t.Fatalf("must be a StateBag")
}
}
func TestBasicStateBag(t *testing.T) {
b := new(BasicStateBag)
if b.Get("foo") != nil {
t.Fatalf("bad: %#v", b.Get("foo"))
}
if _, ok := b.GetOk("foo"); ok {
t.Fatal("should not have foo")
}
b.Put("foo", "bar")
if b.Get("foo").(string) != "bar" {
t.Fatalf("bad")
}
}
|