Skip to content

Commit

Permalink
Fix ut
Browse files Browse the repository at this point in the history
Remove more stuff
  • Loading branch information
jakule committed Jun 10, 2024
1 parent a782cf9 commit 3f87482
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 27 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ require (
github.com/redis/go-redis/v9 v9.5.1 // replaced
github.com/russellhaering/gosaml2 v0.9.1
github.com/russellhaering/goxmldsig v1.4.0
github.com/sashabaranov/go-openai v1.23.0
github.com/schollz/progressbar/v3 v3.14.2
github.com/scim2/filter-parser/v2 v2.2.0
github.com/segmentio/parquet-go v0.0.0-20230712180008-5d42db8f0d47
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2130,8 +2130,6 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0=
github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM=
github.com/sashabaranov/go-openai v1.23.0 h1:KYW97r5yc35PI2MxeLZ3OofecB/6H+yxvSNqiT9u8is=
github.com/sashabaranov/go-openai v1.23.0/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/sassoftware/relic v7.2.1+incompatible h1:Pwyh1F3I0r4clFJXkSI8bOyJINGqpgjJU3DYAZeI05A=
github.com/sassoftware/relic v7.2.1+incompatible/go.mod h1:CWfAxv73/iLZ17rbyhIEq3K9hs5w6FpNMdUT//qR+zk=
github.com/sassoftware/relic/v7 v7.6.2 h1:rS44Lbv9G9eXsukknS4mSjIAuuX+lMq/FnStgmZlUv4=
Expand Down
1 change: 0 additions & 1 deletion lib/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -4338,7 +4338,6 @@ func (process *TeleportProcess) initProxyEndpoint(conn *Connector) error {
return ctx, trace.Wrap(err)
}),
PROXYSigner: proxySigner,
OpenAIConfig: cfg.Testing.OpenAIConfig,
NodeWatcher: nodeWatcher,
AccessGraphAddr: accessGraphAddr,
TracerProvider: process.TracingProvider,
Expand Down
10 changes: 0 additions & 10 deletions lib/service/servicecfg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"github.com/ghodss/yaml"
"github.com/gravitational/trace"
"github.com/jonboulle/clockwork"
"github.com/sashabaranov/go-openai"
"github.com/sirupsen/logrus"
"golang.org/x/crypto/ssh"

Expand Down Expand Up @@ -304,15 +303,6 @@ type ConfigTesting struct {
// require PROXY header if 'proxyProtocolMode: true' even from self connections. Used in tests as all connections are self
// connections there.
KubeMultiplexerIgnoreSelfConnections bool

// OpenAIConfig contains the optional OpenAI client configuration used by
// auth and proxy. When it's not set (the default, we don't offer a way to
// set it when executing the regular Teleport binary) we use the default
// configuration with auth tokens passed from Auth.AssistAPIKey or
// Proxy.AssistAPIKey. We set this only when testing to avoid calls to reach
// the real OpenAI API.
// Note: When set, this overrides Auth and Proxy's AssistAPIKey settings.
OpenAIConfig *openai.ClientConfig
}

// AccessGraphConfig represents TAG server config
Expand Down
4 changes: 0 additions & 4 deletions lib/service/servicecfg/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ type ProxyConfig struct {
// UI provides config options for the web UI
UI webclient.UIConfig

// AssistAPIKey is the OpenAI API key.
// TODO: This key will be moved to a plugin once support for plugins is implemented.
AssistAPIKey string

// TrustXForwardedFor enables the service to take client source IPs from
// the "X-Forwarded-For" headers for web APIs recevied from layer 7 load
// balancers or reverse proxies.
Expand Down
4 changes: 0 additions & 4 deletions lib/web/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import (
"github.com/gravitational/trace"
"github.com/jonboulle/clockwork"
"github.com/julienschmidt/httprouter"
"github.com/sashabaranov/go-openai"
"github.com/sirupsen/logrus"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
oteltrace "go.opentelemetry.io/otel/trace"
Expand Down Expand Up @@ -302,9 +301,6 @@ type Config struct {
// UI provides config options for the web UI
UI webclient.UIConfig

// OpenAIConfig provides config options for the OpenAI integration.
OpenAIConfig *openai.ClientConfig

// NodeWatcher is a services.NodeWatcher used by Assist to lookup nodes from
// the proxy's cache and get nodes in real time.
NodeWatcher *services.NodeWatcher
Expand Down
5 changes: 0 additions & 5 deletions lib/web/apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ import (
"github.com/julienschmidt/httprouter"
"github.com/mailgun/timetools"
"github.com/pquerna/otp/totp"
"github.com/sashabaranov/go-openai"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -197,9 +196,6 @@ type webSuiteConfig struct {
// services.
HealthCheckAppServer healthCheckAppServerFunc

// OpenAIConfig is a custom OpenAI config for the test.
OpenAIConfig *openai.ClientConfig

// ClusterFeatures allows overriding default auth server features
ClusterFeatures *authproto.Features

Expand Down Expand Up @@ -493,7 +489,6 @@ func newWebSuiteWithConfig(t *testing.T, cfg webSuiteConfig) *WebSuite {
Router: router,
HealthCheckAppServer: cfg.HealthCheckAppServer,
UI: cfg.uiConfig,
OpenAIConfig: cfg.OpenAIConfig,
PresenceChecker: cfg.presenceChecker,
GetProxyIdentity: func() (*state.Identity, error) {
return proxyIdentity, nil
Expand Down

0 comments on commit 3f87482

Please sign in to comment.