refact(session connection): remove session connection state table (#4617)
* refact(session connection): remove session connection state table
This commit is contained in:
1 parent
eb6e1b558d
commit
2191aa1d03
27 files changed
+543
-729
No files matched your search
@@ -50,29 +50,6 @@ func Test_TestConnection(t *testing.T) {
|
||||
require.NotNil(c)
|
||||
}
|
||||
|
||||
func Test_TestConnectionState(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
conn, _ := db.TestSetup(t, "postgres")
|
||||
wrapper := db.TestWrapper(t)
|
||||
iamRepo := iam.TestRepo(t, conn, wrapper)
|
||||
s := TestDefaultSession(t, conn, wrapper, iamRepo)
|
||||
require.NotNil(s)
|
||||
assert.NotEmpty(s.PublicId)
|
||||
|
||||
c := TestConnection(t, conn, s.PublicId, "0.0.0.0", 22, "0.0.0.0", 2222, "127.0.0.1")
|
||||
require.NotNil(c)
|
||||
assert.NotEmpty(c.PublicId)
|
||||
|
||||
cs := TestConnectionState(t, conn, c.PublicId, StatusClosed)
|
||||
require.NotNil(cs)
|
||||
|
||||
rw := db.New(conn)
|
||||
var initialState ConnectionState
|
||||
err := rw.LookupWhere(context.Background(), &initialState, "connection_id = ? and state = ?", []any{cs.ConnectionId, cs.Status})
|
||||
require.NoError(err)
|
||||
assert.NotEmpty(initialState.StartTime)
|
||||
}
|
||||
|
||||
func Test_TestWorker(t *testing.T) {
|
||||
require := require.New(t)
|
||||
conn, _ := db.TestSetup(t, "postgres")
|
||||
|
||||
Reference in new issue
Block a user