Skip to content

Commit 8f85ebc

Browse files
committed
Merge remote-tracking branch 'origin/master' into feat/import-native-inline
2 parents 6c1552d + ac7670a commit 8f85ebc

File tree

32 files changed

+21845
-19820
lines changed

32 files changed

+21845
-19820
lines changed

cmd/extension.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (o *extensionOption) runE(cmd *cobra.Command, args []string) (err error) {
7979
err = fmt.Errorf("cannot find %s", arg)
8080
return
8181
}
82-
extFile := o.ociDownloader.GetTargetFile()
82+
extFile := o.ociDownloader.GetTargetFile(arg)
8383
cmd.Println("found target file", extFile)
8484

8585
targetFile := filepath.Base(extFile)

cmd/run.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@ func (o *runOption) runSuite(loader testing.Loader, dataContext map[string]inter
402402
default:
403403
o.limiter.Accept()
404404

405-
ctxWithTimeout, _ := context.WithTimeout(ctx, o.requestTimeout)
405+
ctxWithTimeout, cancel := context.WithTimeout(ctx, o.requestTimeout)
406+
defer cancel() // Ensure context is always cancelled when leaving this scope
406407
ctxWithTimeout = context.WithValue(ctxWithTimeout, runner.ContextKey("").ParentDir(), loader.GetContext())
407408

408409
output, err = suiteRunner.RunTestCase(&testCase, dataContext, ctxWithTimeout)

cmd/testdata/stores.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,30 @@ stores:
66
url: xxx
77
readonly: false
88
disabled: false
9+
- name: ai
10+
kind:
11+
name: atest-ext-ai
12+
enabled: true
13+
url: ""
14+
readonly: false
15+
disabled: false
16+
properties:
17+
- key: "provider"
18+
description: "AI provider (local, openai, claude)"
19+
defaultValue: "local"
20+
- key: "model"
21+
description: "AI model name"
22+
defaultValue: "codellama"
23+
- key: "endpoint"
24+
description: "AI service endpoint"
25+
defaultValue: "http://localhost:11434"
926
plugins:
1027
- name: atest-store-git
1128
url: unix:///tmp/atest-store-git.sock
1229
enabled: true
30+
- name: atest-ext-ai
31+
url: unix:///tmp/atest-ext-ai.sock
32+
enabled: true
33+
description: "AI Extension Plugin for intelligent SQL generation and execution"
34+
version: "latest"
35+
registry: "ghcr.io/linuxsuren/atest-ext-ai"

console/atest-desktop/forge.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,33 @@ module.exports = {
5151
ui: {
5252
"enabled": true,
5353
"chooseDirectory": true
54+
},
55+
beforeCreate: (msiCreator) => {
56+
// Add installation directory to system PATH
57+
msiCreator.wixTemplate = msiCreator.wixTemplate.replace(
58+
'</Product>',
59+
` <Property Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />
60+
<CustomAction Id="AddToPath" Property="PATH" Value="[INSTALLDIR]" Execute="immediate" />
61+
<CustomAction Id="RemoveFromPath" Property="PATH" Value="[INSTALLDIR]" Execute="immediate" />
62+
63+
<InstallExecuteSequence>
64+
<Custom Action="AddToPath" After="InstallFiles">NOT Installed</Custom>
65+
<Custom Action="RemoveFromPath" Before="RemoveFiles">REMOVE="ALL"</Custom>
66+
</InstallExecuteSequence>
67+
68+
<Component Id="PathComponent" Guid="*" Directory="INSTALLDIR">
69+
<Environment Id="PATH" Name="PATH" Value="[INSTALLDIR]" Permanent="no" Part="last" Action="set" System="yes" />
70+
</Component>
71+
72+
</Product>`
73+
);
74+
75+
// Ensure INSTALLDIR is properly defined in the existing ProgramFilesFolder
76+
msiCreator.wixTemplate = msiCreator.wixTemplate.replace(
77+
'<Directory Id="ProgramFilesFolder">',
78+
`<Directory Id="ProgramFilesFolder">
79+
<Directory Id="INSTALLDIR" Name="API Testing" />`
80+
);
5481
}
5582
}
5683
}

0 commit comments

Comments
 (0)