~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/provider/gce/credentials_test.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
}
61
61
 
62
62
func (s *credentialsSuite) TestJSONFileCredentialsValid(c *gc.C) {
 
63
        dir := c.MkDir()
 
64
        filename := filepath.Join(dir, "somefile")
 
65
        err := ioutil.WriteFile(filename, []byte{}, 0600)
 
66
        c.Assert(err, jc.ErrorIsNil)
63
67
        envtesting.AssertProviderCredentialsValid(c, s.provider, "jsonfile", map[string]string{
64
68
                // For now at least, the contents of the file are not validated
65
69
                // by the credentials schema. That is left to the provider.
66
 
                "file": "whatever",
 
70
                // The file does need to be an absolute path though and exist.
 
71
                "file": filename,
67
72
        })
68
73
}
69
74