Merge pull request #12595 from influxdata/fix_secret_endpoint
fix(http): change secrets to match swaggerpull/12564/head
commit
bd952e8d6e
|
@ -189,7 +189,7 @@ func newSecretsResponse(orgID influxdb.ID, ks []string) *secretsResponse {
|
||||||
return &secretsResponse{
|
return &secretsResponse{
|
||||||
Links: map[string]string{
|
Links: map[string]string{
|
||||||
"org": fmt.Sprintf("/api/v2/orgs/%s", orgID),
|
"org": fmt.Sprintf("/api/v2/orgs/%s", orgID),
|
||||||
"secrets": fmt.Sprintf("/api/v2/orgs/%s/secrets", orgID),
|
"self": fmt.Sprintf("/api/v2/orgs/%s/secrets", orgID),
|
||||||
},
|
},
|
||||||
Secrets: ks,
|
Secrets: ks,
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,13 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go.uber.org/zap"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"go.uber.org/zap"
|
||||||
|
|
||||||
platform "github.com/influxdata/influxdb"
|
platform "github.com/influxdata/influxdb"
|
||||||
"github.com/influxdata/influxdb/inmem"
|
"github.com/influxdata/influxdb/inmem"
|
||||||
"github.com/influxdata/influxdb/mock"
|
"github.com/influxdata/influxdb/mock"
|
||||||
|
@ -98,7 +99,7 @@ func TestSecretService_handleGetSecrets(t *testing.T) {
|
||||||
{
|
{
|
||||||
"links": {
|
"links": {
|
||||||
"org": "/api/v2/orgs/0000000000000001",
|
"org": "/api/v2/orgs/0000000000000001",
|
||||||
"secrets": "/api/v2/orgs/0000000000000001/secrets"
|
"self": "/api/v2/orgs/0000000000000001/secrets"
|
||||||
},
|
},
|
||||||
"secrets": [
|
"secrets": [
|
||||||
"hello",
|
"hello",
|
||||||
|
@ -127,7 +128,7 @@ func TestSecretService_handleGetSecrets(t *testing.T) {
|
||||||
{
|
{
|
||||||
"links": {
|
"links": {
|
||||||
"org": "/api/v2/orgs/0000000000000001",
|
"org": "/api/v2/orgs/0000000000000001",
|
||||||
"secrets": "/api/v2/orgs/0000000000000001/secrets"
|
"self": "/api/v2/orgs/0000000000000001/secrets"
|
||||||
},
|
},
|
||||||
"secrets": []
|
"secrets": []
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue