Skip to content

Commit

Permalink
Remove helper and test for changing remote store base URL once instan…
Browse files Browse the repository at this point in the history
…tiated

Signed-off-by: Nassim 'Nass' Eddequiouaq <[email protected]>
  • Loading branch information
n4ss committed Feb 10, 2017
1 parent 4ee0d9d commit 2ae0cf0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
15 changes: 0 additions & 15 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1147,18 +1147,3 @@ func (r *NotaryRepository) DeleteTrustData(deleteRemote bool) error {
}
return nil
}

// SetBaseURL updates the repository's base URL and its associated remote store
func (r *NotaryRepository) setBaseURL(baseURL string) error {
// We try to retrieve the remote store before updating the repository
remoteStore, err := getRemoteStore(baseURL, r.gun, r.roundTrip)
if err != nil {
return err
}

// Update the repository
r.baseURL = baseURL
r.remoteStore = remoteStore

return nil
}
6 changes: 0 additions & 6 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3734,12 +3734,6 @@ func TestDeleteRemoteRepo(t *testing.T) {
meta, err = remoteStore.GetSized(data.CanonicalTimestampRole, store.NoSizeLimit)
require.NoError(t, err)
require.NotNil(t, meta)

// Try setting an invalid server URL before deleting
require.Error(t, repo.setBaseURL("invalid"))

// Try deleting again the remote
require.NoError(t, repo.DeleteTrustData(true))
}

// Test that we get a correct list of roles with keys and signatures
Expand Down

0 comments on commit 2ae0cf0

Please sign in to comment.