(t *testing.T)
| 32 | } |
| 33 | |
| 34 | func TestRuntimeStore_SessionUpdate(t *testing.T) { |
| 35 | // Use a separate store for this test to avoid race conditions |
| 36 | testStore := NewRuntimeStore(NewDefaultRuntimeConfig()) |
| 37 | testValue := make(map[interface{}]interface{}) |
| 38 | testValue["foo"] = "bar" |
| 39 | testValue["kak"] = "lal" |
| 40 | |
| 41 | testState := NewSessionState(testStore, "session_read", testValue) |
| 42 | testStore.SessionUpdate(testState) |
| 43 | |
| 44 | fmt.Println("-------------before update session state------------") |
| 45 | state, _ := testStore.SessionRead("session_read") |
| 46 | fmt.Printf("session state session_read: %+v \n ", state) |
| 47 | |
| 48 | testState.values["foo"] = "newbar" |
| 49 | testStore.SessionUpdate(testState) |
| 50 | |
| 51 | state, _ = testStore.SessionRead("session_read") |
| 52 | fmt.Println("-------------after update session state------------") |
| 53 | fmt.Printf("session state session_read: %+v \n ", state) |
| 54 | } |
| 55 | |
| 56 | func TestNewRuntimeStore_SessionUpdate_StateNotExist(t *testing.T) { |
| 57 | // Use a separate store for this test |
nothing calls this directly
no test coverage detected