Skip to content

Commit

Permalink
Removed /v1 for the cache-clear API
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnayak committed Feb 15, 2019
1 parent 1be6f1d commit f1da74c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion command/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func (c *AgentCommand) Run(args []string) int {

// Create a muxer and add paths relevant for the lease cache layer
mux := http.NewServeMux()
mux.Handle("/v1/agent/cache-clear", leaseCache.HandleCacheClear(ctx))
mux.Handle("/agent/cache-clear", leaseCache.HandleCacheClear(ctx))

mux.Handle("/", cache.Handler(ctx, cacheLogger, leaseCache, config.Cache.UseAutoAuthToken, c.client))

Expand Down
2 changes: 1 addition & 1 deletion command/agent/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func setupClusterAndAgent(ctx context.Context, t *testing.T, coreConfig *vault.C

// Create a muxer and add paths relevant for the lease cache layer
mux := http.NewServeMux()
mux.Handle("/v1/agent/cache-clear", leaseCache.HandleCacheClear(ctx))
mux.Handle("/agent/cache-clear", leaseCache.HandleCacheClear(ctx))

mux.Handle("/", Handler(ctx, cacheLogger, leaseCache, false, clusterClient))
server := &http.Server{
Expand Down
2 changes: 1 addition & 1 deletion command/agent/cache_end_to_end_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func TestCache_UsingAutoAuthToken(t *testing.T) {

// Create a muxer and add paths relevant for the lease cache layer
mux := http.NewServeMux()
mux.Handle("/v1/agent/cache-clear", leaseCache.HandleCacheClear(ctx))
mux.Handle("/agent/cache-clear", leaseCache.HandleCacheClear(ctx))

mux.Handle("/", cache.Handler(ctx, cacheLogger, leaseCache, true, client))
server := &http.Server{
Expand Down

1 comment on commit f1da74c

@jefferai
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this comment of mine came with some other things to think about which were related. Depending on how you and others feel about those comments this may or may not be the right thing to do.

Please sign in to comment.