refact(session connection): remove session connection state table (#4617)

* refact(session connection): remove session connection state table
This commit is contained in:
Irena Rindos authored and GitHub committed 2024-07-23 14:19:21 -04:00
1 parent eb6e1b558d
commit 2191aa1d03
27 files changed
+543 -729

No files matched your search

-17
View File
@@ -41,26 +41,9 @@ func TestConnection(t testing.TB, conn *db.DB, sessionId, clientTcpAddr string,
err = rw.Create(ctx, c)
require.NoError(err)
connectedState, err := NewConnectionState(ctx, c.PublicId, StatusConnected)
require.NoError(err)
err = rw.Create(ctx, connectedState)
require.NoError(err)
return c
}
// TestConnectionState creates a test connection state for the connectionId in the repository.
func TestConnectionState(t testing.TB, conn *db.DB, connectionId string, state ConnectionStatus) *ConnectionState {
t.Helper()
ctx := context.Background()
require := require.New(t)
rw := db.New(conn)
s, err := NewConnectionState(ctx, connectionId, state)
require.NoError(err)
err = rw.Create(context.Background(), s)
require.NoError(err)
return s
}
// TestState creates a test state for the sessionId in the repository.
func TestState(t testing.TB, conn *db.DB, sessionId string, state Status) *State {
t.Helper()