Skip to content

Commit

Permalink
Merge pull request #24 from bobthebuilderberlin/patch-1
Browse files Browse the repository at this point in the history
Fix path for listing context variables
  • Loading branch information
grezar committed May 30, 2022
2 parents 830ced0 + e86d5a2 commit 7bcba5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (s *contexts) ListVariables(ctx context.Context, contextID string) (*Contex
return nil, ErrRequiredContextID
}

u := fmt.Sprintf("context/%s", contextID)
u := fmt.Sprintf("context/%s/environment-variable", contextID)
req, err := s.client.newRequest("GET", u, nil)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func Test_contexts_ListVariables(t *testing.T) {

contextID := "ctx1"

mux.HandleFunc(fmt.Sprintf("/context/%s", contextID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/context/%s/environment-variable", contextID), func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testHeader(t, r, "Accept", "application/json")
testHeader(t, r, "Circle-Token", client.token)
Expand Down

0 comments on commit 7bcba5d

Please sign in to comment.