func TestResolve(t *testing.T) {
	util.InDir("../../testdata", func() {
		cookbookPath := "test-cookbooks"
		defer os.RemoveAll(cookbookPath)

		assert.NoError(t, Resolver{}.Resolve(cookbookPath))

		expectFiles := []string{
			"practicingruby/README.md",
			"practicingruby/attributes",
			"practicingruby/metadata.rb",
			"practicingruby/recipes",
		}
		for _, f := range expectFiles {
			assert.True(t, util.FileExist(path.Join(cookbookPath, f)))
		}
	})
}
func TestNewDriver(t *testing.T) {
	util.InDir("../../testdata", func() {
		sshOpts := []string{"LogLevel=debug"}
		rsyncOpts := []string{"--verbose"}
		drv, err := NewDriver("default-ubuntu-1404", sshOpts, rsyncOpts)
		if assert.NoError(t, err) {
			assert.Equal(t, "127.0.0.1", drv.SSHClient.Host)
			assert.Equal(t, 2222, drv.SSHClient.Port)
			assert.Equal(t, "vagrant", drv.SSHClient.User)
			assert.Equal(t, "/Users/mlafeldt/.vagrant.d/insecure_private_key",
				drv.SSHClient.PrivateKeys[0])
			assert.Equal(t, 6, len(drv.SSHClient.Options))
			assert.Equal(t, "LogLevel=debug", drv.SSHClient.Options[5])

			assert.Equal(t, "127.0.0.1", drv.RsyncClient.RemoteHost)
			assert.Equal(t, rsyncOpts, drv.RsyncClient.Options)
		}
	})
}