From 2ae0cf0b351cd73d665c8bef97921070c1f395b5 Mon Sep 17 00:00:00 2001 From: Nassim 'Nass' Eddequiouaq Date: Fri, 10 Feb 2017 10:26:47 -0800 Subject: [PATCH] Remove helper and test for changing remote store base URL once instantiated Signed-off-by: Nassim 'Nass' Eddequiouaq --- client/client.go | 15 --------------- client/client_test.go | 6 ------ 2 files changed, 21 deletions(-) diff --git a/client/client.go b/client/client.go index 44b2c957b..e9bfcc6a9 100644 --- a/client/client.go +++ b/client/client.go @@ -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 -} diff --git a/client/client_test.go b/client/client_test.go index e16ead436..69ee2d865 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -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