mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-04 12:26:19 +00:00
refactor: workspace setting definitions
This commit is contained in:
@ -16,12 +16,16 @@ func TestWorkspaceSettingStore(t *testing.T) {
|
||||
ts := NewTestingStore(ctx, t)
|
||||
tempSecret := uuid.New().String()
|
||||
workspaceSetting, err := ts.UpsertWorkspaceSetting(ctx, &storepb.WorkspaceSetting{
|
||||
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_SECRET_SESSION,
|
||||
Value: &storepb.WorkspaceSetting_SecretSession{SecretSession: tempSecret},
|
||||
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL,
|
||||
Value: &storepb.WorkspaceSetting_General{
|
||||
General: &storepb.WorkspaceSetting_GeneralSetting{
|
||||
SecretSession: tempSecret,
|
||||
},
|
||||
},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
foundWorkspaceSetting, err := ts.GetWorkspaceSetting(ctx, &store.FindWorkspaceSetting{
|
||||
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_SECRET_SESSION,
|
||||
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, workspaceSetting, foundWorkspaceSetting)
|
||||
|
Reference in New Issue
Block a user