func TestSha1VerifiableApplyOptions(t *testing.T) { innerBlobstore, sha1Verifiable := buildSha1Verifiable() updatedInnerBlobstore := &fakeblob.FakeBlobstore{} innerBlobstore.ApplyOptionsUpdatedBlobstore = updatedInnerBlobstore expectedOptions := map[string]string{"foo": "bar"} updatedSha1Verifiable, err := sha1Verifiable.ApplyOptions(expectedOptions) assert.NoError(t, err) assert.Equal(t, innerBlobstore.Options, expectedOptions) assert.Equal(t, updatedSha1Verifiable, boshblob.NewSha1Verifiable(updatedInnerBlobstore)) }
func buildSha1Verifiable() (innerBlobstore *fakeblob.FakeBlobstore, sha1Verifiable boshblob.Blobstore) { innerBlobstore = &fakeblob.FakeBlobstore{} sha1Verifiable = boshblob.NewSha1Verifiable(innerBlobstore) return }