TestNotInitializedOnPublish doesn't work with repo lazy init at publish time
@@ -1986,26 +1986,6 @@ func testPublishBadMetadata(t *testing.T, roleName string, repo *NotaryRepositor
}
}
-// If the repo is not initialized, calling repo.Publish() should return ErrRepoNotInitialized
-func TestNotInitializedOnPublish(t *testing.T) {
- // Temporary directory where test files will be created
- tempBaseDir, err := ioutil.TempDir("", "notary-test-")
- defer os.RemoveAll(tempBaseDir)
- require.NoError(t, err, "failed to create a temporary directory: %s", err)
-
- gun := "docker.com/notary"
- ts := fullTestServer(t)
- defer ts.Close()
-
- repo, _, _ := createRepoAndKey(t, data.ECDSAKey, tempBaseDir, gun, ts.URL)
-
- addTarget(t, repo, "v1", "../fixtures/intermediate-ca.crt")
-
- err = repo.Publish()
- require.Error(t, err)
- require.IsType(t, ErrRepoNotInitialized{}, err)
-}
-
type cannotCreateKeys struct {
signed.CryptoService
}
