Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Conversation

@coldplaying42
Copy link
Contributor

Fixes #3022

Proposed Changes

Testing

.AddInMemoryCollection(new Dictionary<string, string> { { "root", root }, { "region", region }, { "environment", environment } })
.UseMockLuisSettings(root, root)
.AddUserSecrets("RunBot")
.AddInMemoryCollection(new Dictionary<string, string> { { "root", root }, { "region", region }, { "environment", environment }, {"userSecrets", userSecrets} })
Copy link

@chrimc62 chrimc62 Jan 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"userSecrets", userSecrets} [](start = 145, length = 27)

I don't think you need this. The only place it is used is in the Mock Luis. #Resolved

script.push({
$kind: 'Microsoft.Test.CustomEvent',
name: 'SetTestOptions',
value: `{randomValue : ${record.value.randomValue}}`
Copy link

@chrimc62 chrimc62 Jan 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`{randomValue : ${record.value.randomValue} [](start = 23, length = 43)

Value should be the whole record.value. This will pick up randomValue/randomSeed and anything else added. #Resolved

} else if (isSettingRandomValue(record)) {
script.push({
$kind: 'Microsoft.Test.CustomEvent',
name: 'SetTestOptions',
Copy link

@chrimc62 chrimc62 Jan 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SetTestOptions [](start = 23, length = 14)

I like emitting the custom event since this uses the protocol and we know the underlying bot supports SetTestOptionsMiddleware to pick it up. #Resolved

return record.type === 'trace' && record.valueType === 'Microsoft.HttpRequest'
}

function isSettingRandomValue(record: any): Boolean {
Copy link

@chrimc62 chrimc62 Jan 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isSetTestOptions #Resolved

Copy link

@chrimc62 chrimc62 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@chrimc62
Copy link

chrimc62 commented Jan 15, 2021

The only change I would make is to copy the whole event value into the script. #Resolved

@coldplaying42 coldplaying42 marked this pull request as ready for review January 19, 2021 02:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update TestBot

4 participants